jsonunicode is a small Java API for determining the character encoding of a JSON document. This library can be used when you need to use octet streams with JSON libraries that do not do encoding detection (e.g. Gson, JSON.simple, or the org.json package in Android.)
JSON document:
{"value":1}
UTF-8 hex dump:
0000000: 7b22 7661 6c75 6522 3a31 7d {"value":1}
UTF-16BE hex dump:
0000000: 007b 0022 0076 0061 006c 0075 0065 0022 .{.".v.a.l.u.e." 0000010: 003a 0031 007d .:.1.}