Download Now
Forums

    Reference Codebot.Text.Json.pas

    Part of the Codebot package

    The Codebot.Text.Json unit reads and writes JSON. TJsonNode parses, builds, and navigates a JSON document. Each node is an object, array, boolean, null, number, or string, and you can reach the nodes inside an object or array by name or index, by a path such as N.Find('server/port'), or by looping over them with for in. You only create and free the root node, which looks after all its children.

    You can load and save documents with Parse, LoadFromFile, SaveToFile, and the stream methods, read and write values with AsString, AsNumber, AsBoolean, and the others, and turn a node back into text with AsJson or ToString.

    The unit also gives you routines that validate JSON, encode and decode JSON strings, and convert JSON to XML.

    Items 49 items

    NameKindLine
    EJsonExceptionclass24
    JsonNumberValidatefunction197
    JsonStringDecodefunction203
    JsonStringEncodefunction201
    JsonStringValidatefunction199
    JsonToXmlfunction205
    JsonValidatefunction195
    TJsonNodeclass79
    Addfunction134, 135, 136, 137, 139
    Childfunction148, 150
    Clearprocedure144
    Deleteprocedure141, 142
    Destroydestructor112
    Existsfunction152
    Findfunction154, 156
    Forcefunction158
    GetEnumeratorfunction114
    LoadFromFileprocedure120
    LoadFromStreamprocedure116
    Parseprocedure125
    SaveToFileprocedure122
    SaveToStreamprocedure118
    ToStringfunction160
    TryParsefunction127
    AsArrayproperty181
    AsBooleanproperty187
    AsJsonproperty179
    AsNullproperty185
    AsNumberproperty191
    AsObjectproperty183
    AsStringproperty189
    Countproperty174
    Kindproperty167
    Nameproperty169
    Parentproperty164
    Rootproperty162
    Valueproperty171
    TJsonNodeEnumeratorrecord46
    GetCurrentfunction54
    Initprocedure52
    MoveNextfunction56
    Currentproperty58
    TJsonNodeKindenum28
    nkObjectenum value30
    nkArrayenum value32
    nkBoolenum value34
    nkNullenum value36
    nkNumberenum value38
    nkStringenum value40