simdjson / simdjson-java

A Java version of simdjson, a high-performance JSON parser utilizing SIMD instructions
Apache License 2.0
288 stars 22 forks source link

How to convert JsonValue to String #55

Closed DenineLu closed 1 month ago

DenineLu commented 5 months ago

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 commented 1 month ago

This looks like a duplicate of https://github.com/simdjson/simdjson-java/issues/39. Feel free to reopen it if my understanding is incorrect.