Permite popular o objeto JSON através das informações contidas na string em formato JSON.
Sintaxe
JsonObject:fromJSON( cJSON )
Parâmetros
Nome | Tipo | Descrição | Obrigatório | Referência |
|---|---|---|---|---|
cJSON | caractere | Indica a string que contém o conteúdo em formato JSON que será carregado no objeto. | X |
Retorno
Nome | Tipo | Descrição |
|---|---|---|
cRet | caractere | Retorna uma string contendo um erro casa haja erro e NIL caso não ocorra problemas. |
Exemplo
Exemplo 1
#include "protheus.ch"
user function tstJsonObject()
local wrk
wrk := JsonObject():new()
wrk:JsonObject('{"name":"John", "age":31, "city":"New York"}') )
FreeObj(wrk)
return
Visão Geral
Import HTML Content
Conteúdo das Ferramentas
Tarefas