Skip to content

Commit

Permalink
Add JSonize method to a Document type (#3273)
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeyRyabinin authored Jan 30, 2025
1 parent 0c27d67 commit a440a90
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/aws-cpp-sdk-core/include/aws/core/utils/Document.h
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,10 @@ namespace Aws
*/
DocumentView View() const;

/**
* Convert this document to a JsonValue
*/
Aws::Utils::Json::JsonValue Jsonize() const;
private:
void Destroy();
Document(cJSON* value);
Expand Down
4 changes: 4 additions & 0 deletions src/aws-cpp-sdk-core/source/utils/Document.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,10 @@ DocumentView Document::View() const
return *this;
}

Json::JsonValue Document::Jsonize() const {
return Json::JsonValue(View());
}

DocumentView::DocumentView() : m_json(nullptr)
{
}
Expand Down

0 comments on commit a440a90

Please sign in to comment.