cParamValid JSON text.
AdvPL GuideFWJsonDeserialize(cParam, @uRet) --> lRetParses JSON in legacy code.
Deprecated legacy function: the current page recommends JsonObject with no further maintenance. Historical documentation describes parsing into a dynamic object by reference with logical success; original class methods are not restored and numeric attribute names have limitations. This example uses constant JSON and checks success before property access. It performs neither macro evaluation nor schema validation. (Sources: refs. 1–2.)
FWJsonDeserialize(cParam, @uRet) --> lRetcParamValid JSON text.
uRetOutput variable by reference.
Logical; object returned by reference.
#Include "Protheus.ch"
User Function Ed432()
Local oData
// Fixed input; check success before accessing it.
If FWJsonDeserialize('{"code":"ED01"}',@oData)
ConOut(oData:code)
FreeObj(oData)
EndIf
Return NilED01 after success; code is a fixed teaching-contract key. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.
© 2026 Usina.BR. All rights reserved. TOTVS, Protheus, Microsiga and their respective logos are trademarks of their owners. AdvPL Guide is independent and uses limited, attributed excerpts justified by educational purposes. See the Terms of Use. Terms of Use
Comments
There are no approved comments yet.
Sign in with Google or Microsoft to comment.