Map<String, Object> map = new LinkedHashMap<String, Object>();
map.put("TOP", "value");
map.put("bytes", new byte[] { 1, 2 });
MapSerializer mapSerializer = new MapSerializer();
mapSerializer.write(new JSONSerializer(out), map, null, null);
String text = out.toString();
Assert.assertEquals("{\"TOP\":\"value\",\"bytes\":\"AQI=\"}", text);
JSONObject json = JSON.parseObject(text);