Skip to content

How to convert JsonValue to String #55

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

Closed
DenineLu opened this issue Jun 24, 2024 · 1 comment
Closed

How to convert JsonValue to String #55

DenineLu opened this issue Jun 24, 2024 · 1 comment

Comments

@DenineLu
Copy link

For DOM parser, how to convert JsonValue to byte array or string? For example:

byte[] json = toUtf8("{\"a\": {\"b\": \"c\"}}");
JsonValue jsonValue = parser.parse(json, json.length);
JsonValue res = jsonValue.get("a");

I want to get the string {"b": "c"}. Thank you in advance for your help with this question.

@piotrrzysko
Copy link
Member

This looks like a duplicate of #39. Feel free to reopen it if my understanding is incorrect.

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