There is a gremlin in the response. I cannot see it in the debugger , but the 
leading character is not (. If I set it to the pasteboard and paste it the JSON 
Validator it disappears as well if I paste it into a text editor.

The following fixes it…

If (Substring($Response;1;1)#"{")                       
        Repeat 
                $Response:=Delete string($Response;1;1)
        Until (Substring($Response;1;1)="{") | ($Response="")
End if 

John


> On Jun 2, 2019, at 3:05 PM, JOHN BAUGHMAN via 4D_Tech <[email protected]> 
> wrote:
> 
> I am getting the following from zip-codes.com…
> 
> {
>       "item": {
>               "ID": "77252",
>               "Medicare_Rating_Area_ID": "1"
>       }
> }
> 
> The list under item: s much much longer. If I use JASON Parse it throws an 
> error….
> 
>       JSON malformed in line 1, position 1
> 
> If I run it in the JSON Validtor at https://jsonlint.com it comes up valid.
> 
> What’s up with that? Can I fix the response so that it validates in 4D?
> 
> Thanks,
> 
> John
> 
> 
> 
> John Baughman
> Kailua, Hawaii
> (808) 262-0328
> [email protected]
> 
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:[email protected]
> **********************************************************************

**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to