News for hackers. Stuff that matters.
Re:New better alterative to XML, JSON and YAML by cryptonector on Monday November 04, 2024 @11:16AM (#42042953)
I should have been clearer. jq is a programming language, but it's also a data language in that a) valid JSON is a valid jq program, b) you can construct JSON data trivially with jq.

E.g.,

  : ; jq -n '
      .users[0].name="John"
    | .users[1].name="Jane"
  '
or

  : ; jq -n '
      .users = []
    | .users += [{}|.name = "John"]
    | .users += [{}|.name = "Jane"]
  '
but you can make it much much richer than that.
Re:New better alterative to XML, JSON and YAML by GeneThomas on Wednesday November 06, 2024 @08:56PM (#42072450)
irrelevant