Replies: 2 comments 2 replies
-
|
One or two people have mentioned something along these lines. It's certainly worth considering if there's enough interest. But FracturedJson is largely meant to be a mostly one-size-fits-all tool, so any feature like this would have to respect that part of the mission. I don't know much about JSONPath, so I'm not sure how difficult it would be to implement that part of it. FJ relies on its own custom DOM, so I wouldn't assume that an existing library could be used for those evaluations. But maybe. I'm also not sure how easy it would be to change the rules in the middle of processing certain modes. Presumably this feature would only apply to the .NET and JS libraries; I can't imagine trying to make a usable version for the VSCode or web-based formatter. What sorts of use cases do you imagine this would be useful for, @jon-freed ? |
Beta Was this translation helpful? Give feedback.
-
|
I don't have many more details to offer than it would occasionally be nice to do different formatting for different parts of a file. I know that isn't very helpful lol, sorry. Usually it's when I am dealing with different versions of the same file, and I am trying to wrangle them to make visual comparisons easier to do. (I do a lot of work with Salesforce metadata. So, that's generally the context. To make matters more interesting, a lot of that metadata is XML. However, I tend to work with it in JSON format because one of the better libraries --- which Salesforce itself uses a lot --- is Node.js/JavaScript: https://github.com/jsforce/jsforce.) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Has there been any consideration of adding support inside FracturedJson for JSON-path–based configuration? In other words, allowing users to apply different formatting options to different parts of an object based on their JSON path?
Or is there an easy way to wrap FracturedJson to accomplish this? I am imagining a configuration that is something like this:
Beta Was this translation helpful? Give feedback.
All reactions