{"abc":{"xyz":false,"ur":{"contractAcceptanceMedium":"WEB"}},"aa":{"soapRequest":{"customerSearch":{"vv":{"Address1":"NTAwIEUgRnJhbmtsaW4gU3Q=","unitNumber":"NzY0Mg==","zipCode":"MjMyMTk="},"sessionId":""}}},"selectCRequest":{"ff":{"sessionId":"","searchSelectionChoice":{}}},"queryBadDebtRestRequest":{"soapRequest":{"sessionId":"","firstName":null,"lastName":null,"emailAddress":null,"socialSecurityNumber":null,"Number":null,"creditCheckConsent":false},"doB":null}}
first = {"verifyAgentProfileRestRequest":{"isDevice":false,"soapRequest":{"contractAcceptanceMedium":"WEB"}},"searchCustomerProfileRestRequest":{"soapRequest":{"customerSearch":{"address":{"streetAddress1":"NTAwIEUgRnJhbmtsaW4gU3Q=","unitNumber":"NzY0Mg==","zipCode":"MjMyMTk="},"sessionId":""}}},"selectCustomerProfileRestRequest":{"soapRequest":{"sessionId":"","searchSelectionChoice":{}}},"queryBadDebtRestRequest":{"soapRequest":{"sessionId":"","firstName":null,"lastName":null,"emailAddress":null,"socialSecurityNumber":null,"telephoneNumber":null,"creditCheckConsent":false},"dateOfBirth":null}}
7.20 FormatJson(json as Object, flags = 0 as Integer) as String
Formats an Associative Array as a JSON string.
Data types supported are booleans, integer and floating point numbers, strings, roArray, and roAssociativeArray objects.
An error will be returned if arrays/associative arrays are nested more than 256 levels deep.
If an error occurs an empty string will be returned.
Normally non-ASCII characters are escaped in the output string as "\uXXXX" where XXXX is the hexadecimal representation of the Unicode character value. If flags=1, non-ASCII characters are not escaped.
"cpjamloki" wrote:first = {"firstName":null,"lastName":null,"emailAddress":null,"socialSecurityNumber":null,"telephoneNumber":null,"creditCheckConsent":false},"dateOfBirth":null}}
firststr = FormatJson(first,0)
print"firststr =" firststr
it's giving syntax error here .
null = invalidprior to assigning to first, to address that.
first = {a:"b"}
first = {"a":"b"}
"RokuKC" wrote:
However, in the current firmware (6.2), BrightScript also doesn't support quoting the key names, so it still won't work.
"EnTerr" wrote:
<prick up ears> What-what?