TJSONData class
Base (abstract) object for all JSON based data types.
Declaration
TJSONData = class(TObject)Inheritance
- TJSONData
- TObject
Descends from it: TJSONArray TJSONBoolean TJSONNull TJSONNumber TJSONObject TJSONString
Description
TJSONData is an abstract class which introduces all properties
and methods needed to work with JSON-based data. It should never be
instantiated. Based on the type of data that must be represented one of the
following descendents must be instantiated instead.
- Numbers
- must be represented using one of TJSONIntegerNumber, TJSONFloatNumber or TJSONInt64Number, depending on the type of the number.
- Strings
- can be represented with TJSONString.
- Boolean
- can be represented with TJSONBoolean.
- null
- is supported using TJSONNull
- Array
- data can be represented using TJSONArray
- Object
- data can be supported using TJSONObject
See also
Properties
CompressedJSON | public | Compress JSON - skip whitespace. |
Count | public | Number of sub-items for this data element. |
Items | public | Indexed access to sub-items. |
Value | public | The value of this data object as a variant. |
AsString | public | Access the raw JSON value as a string. |
AsUnicodeString | public | Return the value as a Unicode string. |
AsInt64 | public | Access the raw JSON value as an 64-bit integer. |
AsQWord | public | Access the raw JSON value as an 64-bit unsigned integer. |
AsLargeInt | public | Access to data as largeint. |
AsFloat | public | Access the raw JSON value as a float. |
AsInteger | public | Access the raw JSON value as an 32-bit integer. |
AsBoolean | public | Access the raw JSON value as a boolean. |
IsNull | public | Is the data a null value ? |
AsJSON | public | Return a JSON representation of the value. |
Methods
DoError | protected | |
DoFindPath | protected | |
GetAsBoolean | protected | |
GetAsFloat | protected | |
GetAsInteger | protected | |
GetIsNull | protected | |
GetAsInt64 | protected | |
GetAsQWord | protected | |
GetAsUnicodeString | protected | |
SetAsInt64 | protected | |
SetAsQword | protected | |
SetAsUnicodeString | protected | |
SetAsBoolean | protected | |
SetAsFloat | protected | |
SetAsInteger | protected | |
GetAsJSON | protected | |
GetAsString | protected | |
SetAsString | protected | |
GetValue | protected | |
SetValue | protected | |
GetItem | protected | |
SetItem | protected | |
DoFormatJSON | protected | |
GetCount | protected | |
JSONType | public | The native JSON data type represented by this object. |
Create | public | Create a new instance of TJSONData. |
Clear | public | Clear the raw value of this data object. |
DumpJSON | public | Fast, memory efficient dump of JSON in stream. |
GetEnumerator | public | Return an enumerator for the data. |
FindPath | public | Find data by name. |
GetPath | public | Get data by name. |
Clone | public | Duplicate the value of the JSON data. |
FormatJSON | public | Return a formatted JSON representation of the data. |
Types and constants
TFormatJSONContext | protected |
Inherited
From TObject (41)
AfterConstruction BeforeDestruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Destroy Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName SafeCallException StringMessageTable SystemHasExtendedRTTI ToString UnitName
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
