Forward declaration of folly::dynamic used for serializing results.
Synopsis
Declared in <folly/json/dynamic.h>
struct dynamic;
Types
Name |
Description |
Trait mapping an arithmetic type to the dynamic member it is stored as. |
|
Used with the array‐range ctor. |
|
Const iterator over the key‐value items of an object. |
|
Const iterator over the keys of an object. |
|
Const iterator over the values of an object. |
|
Mutable iterator over the key‐value items of an object. |
|
Error describing why a JSON pointer failed to resolve. |
|
A value located by resolving a JSON pointer, with its parent context. |
|
Mutable iterator over the values of an object. |
Type Aliases
Name |
Description |
Const iterator over array elements. |
|
Mutable iterator over array elements. |
|
The result of resolving a JSON pointer: either the resolved value or a resolution error. |
|
The element type held by a dynamic array. |
Enums
Name |
Description |
The set of types a dynamic can hold. |
|
|
Reason a JSON pointer failed to resolve against a dynamic. |
Member Functions
Name |
Description |
|
Constructors |
|
Destroys the dynamic and any value it holds. |
Assignment operators |
|
Type conversion. |
|
Type conversion. |
|
Type conversion. |
|
Type conversion. |
|
Access sub‐field or index. |
|
Return reference to the last element in an array. |
|
Array iteration. |
|
|
|
Check if key exists. |
|
Count by key. |
|
Overwriting emplacement. |
|
Tests for emptiness. |
|
Array iteration. |
|
|
|
Erase one object item and move its key and value into a callback. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Hash self. |
|
|
|
Type test. |
|
Type test. |
|
Type test. |
|
Type test. |
|
Type test. |
|
Type test. |
|
Type test. |
|
Type test. |
|
Get key‐value items of an object. |
|
Get the keys of an object. |
|
Merge JSON Patch. |
|
Assigns the remainder of dividing this dynamic by another. methodset Op |
|
Bitwise‐ANDs another dynamic into this one. methodset Op |
|
Multiplies this dynamic by another. methodset Op |
|
Increment operators |
|
Adds another dynamic into this one. methodset Op |
|
Decrement operators |
|
Subtracts another dynamic from this one. methodset Op |
|
Divides this dynamic by another. methodset Op |
|
Subscript operators |
|
Bitwise‐XORs another dynamic into this one. methodset Op |
|
Bitwise‐ORs another dynamic into this one. methodset Op |
|
Remove an element from the back of an array. |
|
|
|
Pre‐allocate size. |
|
Change size. |
|
|
|
Get size. |
|
|
|
Non‐overwriting emplacement. |
|
|
|
The type of this dynamic. |
|
The type of this dynamic as a printable string. |
|
Merge objects. |
|
Extends this object with mergeObj1, keeping this object's value on duplicate keys. |
|
Get the values of an object. |
Static Member Functions
Name |
Description |
|
|
|
|
Creates a new object with the key/value pairs of both objects, preferring the second object's value on duplicate keys. |
|
Compute patch. |
|
|
Static Data Members
Name |
Description |
Tag value selecting the array‐range constructor. |
Friends
Name |
Description |
Exception thrown when a dynamic is accessed as the wrong type. |
|
A mutable view of a dynamic that can extract values without copying. |
|
/////////////////////////////////////////////////////////////////// |
|
Streams a dynamic to an output stream. |
|
Adds two dynamics, reusing the left‐hand operand's storage. |
|
Bitwise‐XORs two dynamics. |
|
Bitwise‐ANDs two dynamics. |
|
Bitwise‐ORs two dynamics. |
|
Computes the remainder of dividing two dynamics. |
|
Divides two dynamics. |
|
Multiplies two dynamics. |
|
Subtracts two dynamics. |
|
Adds two dynamics. |
|
Greater‐than‐or‐equal comparison. |
|
Less‐than‐or‐equal comparison. |
|
Greater‐than comparison. |
|
Orders two dynamics. |
|
Deep inequality comparison. |
|
Deep equality comparison. This will compare all the way down an object or array, and is potentially expensive. |
Non-Member Functions
Name |
Description |
Printer for GTest. |
|
Deserialize benchmark results from a dynamic value. |
|
Like compareJson, but with dynamic instances. |
|
Like compareJsonWithTolerance, but operates directly on the dynamics. |
|
Return a well‐typed representation of a dynamic. |
|
Like erase(vector), since C++20. |
|
Like erase_if(vector), erase_if(unordered_map), since C++20. |
|
Convert a LogHandlerConfig object to a folly::dynamic object. |
|
Convert a LogConfig object to a folly::dynamic object. |
|
Convert a LogCategoryConfig object to a folly::dynamic object. |
|
Deleted to prevent viewing a temporary dynamic. |
|
Returns a contextually‐correct view for the given dynamic. |
|
Returns a contextually‐correct view for the given dynamic. |
|
Parse a json blob out of a range and produce a dynamic representing it. |
|
Parse a json blob out of a range and produce a dynamic representing it. |
|
Parse an experimental json5 blob and produce a dynamic representing it. |
|
Parse a json blob, recording parse metadata for each value. |
|
Parse a json blob with options, recording parse metadata for each value. |
|
Parse a folly::dynamic object. |
|
Turn an arbitrary type into a dynamic. |
|
Serialize a dynamic into a json string. |
|
Serialize a dynamic into a json string with indentation. Note that the keys of all objects will be sorted. |
|
Parse a BSER value from a string with deserialization options. |
|
Parse a BSER value from an IOBuf with deserialization options. |
|
Parse a BSER value from an IOBuf. |
|
Parse a BSER value from a byte range with deserialization options. |
|
Parse a BSER value from a string. |
|
Parse a BSER value from a byte range. |
|
Serialize a dynamic value to a BSER‐encoded string. |
|
Serialize a dynamic value to a BSER‐encoded IOBuf. |
|
Serialize dynamic to json‐string, with options. |
|
Make a validator that can be used to check various json. Thread‐safe. |
Created with MrDocs