It looks like there are two maintained implementations of this at the moment - one in C# https://github.com/j-brooke/FracturedJson/wiki/.NET-Library and another in TypeScript/JavaScript https://github.com/j-brooke/FracturedJsonJs . They each have their own test suite. There's an older pure Python version but it's no longer maintained - the author of that recently replaced it with a Python library wrapping the C# code…
FracturedJson
171–173 of 173 posts
Re: FracturedJson
#172I made a silly groovy script called "mommyjson" that doesn't try to preserve JSON formatting but just focuses on giving you the parentage (thus the name) including array indexes, object names, etc., all on the same line, so that when you find something, you know exactly where it is semantically. Not gonna claim that everybody should use it or that it cures insomnia cancer & hangnails, but feel free to borrow it: http…
This is good! There are a number of these, so it seems like it's definitely somthing people want. The most popular of which I think is gron[0]. My own is jstream[1]. One tiny point of friendly feedback: you may want to consider adding an example usage/output so folks can see what it does literally. [0] - https://github.com/tomnomnom/gron [1] - https://github.com/ckampfe/jstream
Being a lazy slob, I never saw fit to make a dedicated repo (or even, directory) so I have no place for a readme. After all the whole thing fits in one script.
Gron is a great name and the output looks pretty good... I like the idea of outputting perfectly valid javascript (with semicolons, even...)
Let's see if HN will format this sample output from mommyjson right:
employees: [199] profile: projects: [0] tasks: [0] description: Optimized grid-enabled parallelism
employees: [199] profile: projects: [0] tasks: [0] taskId: T368
employees: [199] profile: projects: [0] tasks: [0] assignedTo: {
employees: [199] profile: projects: [0] tasks: [0] assignedTo: id: E00200
employees: [199] profile: projects: [0] tasks: [0] assignedTo: name: Timothy Mullins
employees: [199] profile: projects: [0] tasks: [0] assignedTo: skills: {
employees: [199] profile: projects: [0] tasks: [0] assignedTo: skills: primary: C++
employees: [199] profile: projects: [0] tasks: [0] assignedTo: skills: experience: {
employees: [199] profile: projects: [0] tasks: [0] assignedTo: skills: experience: years: 10Re: FracturedJson
#173I made a silly groovy script called "mommyjson" that doesn't try to preserve JSON formatting but just focuses on giving you the parentage (thus the name) including array indexes, object names, etc., all on the same line, so that when you find something, you know exactly where it is semantically. Not gonna claim that everybody should use it or that it cures insomnia cancer & hangnails, but feel free to borrow it: http…
do you have an ouput example?