Sample code for 30+ languages & platforms
PureBasic

Decode HTML Entity Encoded JSON

See more JSON Examples

Decodes an HTML entity encoded string to JSON.

Chilkat PureBasic Downloads

PureBasic
IncludeFile "CkStringBuilder.pb"

Procedure ChilkatExample()

    success.i = 0

    sb.i = CkStringBuilder::ckCreate()
    If sb.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    success = CkStringBuilder::ckAppend(sb,"{"xyz": "abc"}")

    CkStringBuilder::ckEntityDecode(sb)

    ; This is a test comment;
    Debug CkStringBuilder::ckGetAsString(sb)

    ; Output is:

    ; {"xyz": "abc"}


    CkStringBuilder::ckDispose(sb)


    ProcedureReturn
EndProcedure