Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render Hocon as JSON #87

Open
iron9light opened this issue Apr 15, 2019 · 5 comments
Open

Render Hocon as JSON #87

iron9light opened this issue Apr 15, 2019 · 5 comments

Comments

@iron9light
Copy link
Contributor

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?

@Arkatufus
Copy link
Contributor

No, there is no support for rendering HOCON into JSON. HOCON is not supposed to be backward compatible with JSON.

@iron9light
Copy link
Contributor Author

@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

@Arkatufus
Copy link
Contributor

Well, you could make a PR, and we can discuss it further?

@iron9light
Copy link
Contributor Author

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.

@Arkatufus
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants