Open iron9light opened 5 years ago
No, there is no support for rendering HOCON into JSON. HOCON is not supposed to be backward compatible with JSON.
@Arkatufus Oh! really?! Then why lightbend can do this? And I just create concept-proven project: https://github.com/iron9light/HOCON.Json Check it out :-P
Well, you could make a PR, and we can discuss it further?
Well, I've tried to transfer Hocon to Json.Net, it works so far. (I've used it in my private project).
But the better way should be something similar to what's Java's Hocon done.
Should be part of PrettyPrint
.
Then it doesn't need to depend on the 3rd lib.
Did this project copy from Java's Hocon line by line? If not (my understanding is NOT), why not? And will take more effort to port this feature to Hocon.Net.
Yes, this is our own parser, based on the Hocon specification documentation. Making the feature part of PrettyPrint
is a good idea, you can pass parameters and generate the proper string output from it.
Java version Hocon can render Hocon element as JSON ( https://github.com/lightbend/config/blob/master/config/src/main/java/com/typesafe/config/ConfigRenderOptions.java )
Can akkadotnet Hocon provide the same feature?