As far as I know, PetitParser is a parser which we can define grammers and actions to parse some text.
I've successfully use its built-in JSON parser to parse some JSON string, but I want to do more. I want to write a JSON formatter which can format the JSON to a pretty-print style.
But I don't know what to do. Do I have to create some nodes and build a tree for a parsed JSON? And how to do it?
I'm trying to look for some samples, but not found yet.