Skip to content

Commit

Permalink
Update matjson.hpp
Browse files Browse the repository at this point in the history
  • Loading branch information
altalk23 authored Nov 18, 2024
1 parent 28887f4 commit 346c127
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions include/matjson.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,20 @@ namespace matjson {
/// @return The JSON object
Value makeObject(std::initializer_list<std::pair<std::string, Value>>);

/// Creates a JSON array from a list of values
/// Example:
/// > auto arr = makeArray({ 123, "value" });
/// @param entries List of values
/// @return The JSON array
Value makeArray(std::initializer_list<Value>);

class MAT_JSON_DLL Value {
std::unique_ptr<ValueImpl> m_impl;
friend ValueImpl;
Value(std::unique_ptr<ValueImpl>);

friend Value matjson::makeObject(std::initializer_list<std::pair<std::string, Value>>);
friend Value matjson::makeArray(std::initializer_list<Value>);
void setKey_(std::string_view key);
Value(std::vector<Value>, bool);

Expand Down

0 comments on commit 346c127

Please sign in to comment.