7 votes

JMESPath is a query language for JSON.

Tags: json

8 comments

  1. [3]
    Meenhard
    Link
    It looks pretty cool. Though I am not sure if it will gain any traction like XMLQuery. Even more so since Json is usually directly parsed into models.

    It looks pretty cool. Though I am not sure if it will gain any traction like XMLQuery. Even more so since Json is usually directly parsed into models.

    1 vote
    1. [2]
      joelthelion
      Link Parent
      I think it would help a lot with languages such as Haskell, where you need to either model the whole JSON tree (when in reality you might only care for 5% of what's in it), or deal with "lenses"....

      I think it would help a lot with languages such as Haskell, where you need to either model the whole JSON tree (when in reality you might only care for 5% of what's in it), or deal with "lenses". Here you would express what you care about as one JMESPath query, and only parse the output of the query. And sure enough there is a Haskell module for it:

      https://github.com/gcapizzi/jamespath-hs

      4 votes
      1. moredhel
        Link Parent
        How interesting, I've struggled with this before in a few different languages and this could help out massively in terms of overhead

        How interesting, I've struggled with this before in a few different languages and this could help out massively in terms of overhead

  2. [3]
    minikrob
    Link
    This looks great. I feel like it's something data scientists and the like would benefit a lot for data extraction and structuration when digging in large data sets.

    This looks great. I feel like it's something data scientists and the like would benefit a lot for data extraction and structuration when digging in large data sets.

    1 vote
    1. [2]
      joelthelion
      Link Parent
      I would try to avoid JSON for large datasets, though.

      I would try to avoid JSON for large datasets, though.

      1. minikrob
        Link Parent
        I agree, but I see pretty much everyday people working with huge geoJson sets, I was thinking about them!

        I agree, but I see pretty much everyday people working with huge geoJson sets, I was thinking about them!

        2 votes
  3. [2]
    moredhel
    Link
    This seems very similar to the jq tool in terms of query structure. Has anyone played with both of them and would care to comment on the differences? I would expect that the jq query language...

    This seems very similar to the jq tool in terms of query structure. Has anyone played with both of them and would care to comment on the differences? I would expect that the jq query language isn't formally verified (assuming it is different).

    1 vote
    1. joelthelion
      Link Parent
      Well, jq is one tool, this is a specification that can be implemented as libraries or independent tools. I've read that jq is more powerful than this, but if this can become ubiquitous, I think...

      Well, jq is one tool, this is a specification that can be implemented as libraries or independent tools.

      I've read that jq is more powerful than this, but if this can become ubiquitous, I think it's even more interesting.

      1 vote