I’ve watched Paul’s video on HTTPSocket and receiving a JSON array from a REST-API, but what if I just want to return something very simple, like just a JSON object? Something like: { “1”,“2”,“3”} or {“result”:“true”}.
I can’t seem to make Xojo recognize that as a JSON object. Do I have to receive a JSON array?
No, that should have said Data. Sometimes you have to infer or correct things with free examples.
You would have to turn it into valid JSON (as Kem noted "key": value) so something like {"NumbersArray": [1, 2, 3]} would work. You should just use the methods that build and deconstruct JSON rather than manually handling it (on both ends).