qb64pe-json - A library for JSON parsing and creation
#3
So great! Will try it soon.

Question. When dealing with large JSON data it would be great if the lib could support splat operator as part of search function.

For example with this JSON:


Code: (Select All)
{
    "shapes": [
         "square": {
              "name": "Simple Square",
              "sides": 4
          },
         "triangle": {
              "name": "Just a Triangle",
              "sides": 3
          },
         "line": {
              "name": "Line is just 2 points",
              "sides": 0,
              "points": 2
          },
          "circle": {
              "name": "Here we have 1 point for origin of Circle",
              "sides": 0,
              "points": 1,
              "radius": 100
          }
    ]

}

Then you could use like:
Code: (Select All)
shapes[*].name

to get the names back as an array of strings (bad example but maybe you get my meaning?)


JSON is cool until you have to walk anonymous stuff 10 levels deep to get at what you really care about Smile

Thanks for your lib!
grymmjack (gj!)
GitHubYouTube | Soundcloud | 16colo.rs
Reply


Messages In This Thread
RE: qb64pe-json - A library for JSON parsing and creation - by grymmjack - 03-22-2023, 05:28 AM



Users browsing this thread: 4 Guest(s)