-
Notifications
You must be signed in to change notification settings - Fork 57
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
Convert hjson - object #86
Comments
There should be something like a |
Yes. I'm using C#.
Vào 21:40 Th 7, 13 thg 4 2019 dqsully <[email protected]> đã viết:
… There should be something like a Hjson.Stringify function, but it really
depends on which language you are writing in. Is this in C#?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#86 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AvLNsN_4i2kWr5NBDvHw8QhnRDxWU_doks5vgexFgaJpZM4ct7Nw>
.
|
myObj.ToString(Stringify.Hjson); // Hjson output
myObj.ToString(Stringify.Formatted); // formatted JSON output
myObj.ToString(Stringify.Plain); // plain JSON output, default
myObj.ToString(); // plain Or there's also another way using a var sw=new StringWriter();
HjsonValue.Save(myObj, sw, new HjsonOptions() { KeepWsc = true });
Console.WriteLine(sw.ToString()); |
Yes. Thanks for your suggestion. |
Does hjson have fuctions parse hjson to object and convert object to hjson?
e.g.
var myObj = Hjson.Parse(strInput);
var strOutput = Hjson.SerializeObject(myObj);
The text was updated successfully, but these errors were encountered: