News for hackers. Stuff that matters.
Re:JsonLogic by picometer on Thursday May 27, 2021 @06:39PM (#27309463)
{ "a": [ { "b": "foo" }, { "c": "bar" } ] }

vs.

{ "a": [ { "b": "too" }, { "c": "bar" }, { "b": "uh oh" } ] }

Re:JsonLogic by enriquto on Friday May 28, 2021 @08:05AM (#27314374)
> { "a": [ { "b": "foo" }, { "c": "bar" } ] }

This looks like line noise to me. All that punctuation and quoting looks ridiculous. What is the problem with straightforward and trivial to parse things like

    [a]
    b = foo
    c = bar
or even

    a.b = foo
    a.c = bar
Re:JsonLogic by nly on Thursday May 27, 2021 @06:48PM (#27309570)
Yes, so in essence:

- Only ever have a single key in each JSON object (treating them as tuples)

- Make all object values arrays.

It makes for some very unnatural looking JSON.

Re:JsonLogic by dragonwriter on Friday May 28, 2021 @09:27AM (#27315073)
> It makes for some very unnatural looking JSON.

Not to me; its a fairly standard and natural JSON pattern. It’s tue that it use is usually quite limited in any given representation, but usually the thing you are modelling in JSON isn’t general XML with no further knowledge of application domain or logical schema.

Re:JsonLogic by 8note on Thursday May 27, 2021 @08:29PM (#27310385)
The only thing that doesn't look natural to me is that it's all on one line.

Otherwise it's very clear about the data's format and when there's ordering required