Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Macro JSONStructure(Buffer, Type, Callback)
- Define Json_#Type = CreateJSON(#PB_Any)
- If IsJSON(Json_#Type)
- InsertJSONStructure(JSONValue(Json_#Type), Buffer, Type)
- Define Result.s = ComposeJSON(Json_#Type, #PB_JSON_PrettyPrint)
- CallFunctionFast(Callback, @Result)
- FreeJSON(Json_#Type)
- EndIf
- EndMacro
- Structure DEMO
- a.i
- b.l
- EndStructure
- Define demo.DEMO
- demo\a = 10
- demo\b = 77
- Procedure Callback(Json.s)
- Debug Json
- EndProcedure
- JSONStructure(@demo, DEMO, @Callback())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement