use of data.media.writeAsArray.MediaSerializer in project fastjson by alibaba.
the class BenchmarkMain_EishayEncode_WriteAsArray method main.
public static void main(String[] args) throws Exception {
SerializeConfig config = SerializeConfig.getGlobalInstance();
config.put(MediaContent.class, new MediaContentSerializer());
config.put(Media.class, new MediaSerializer());
config.put(Image.class, new ImageSerializer());
System.out.println(System.getProperty("java.vm.name") + " " + System.getProperty("java.runtime.version"));
List<String> arguments = ManagementFactory.getRuntimeMXBean().getInputArguments();
System.out.println(arguments);
MediaContent content = EishayDecodeBytes.instance.getContent();
String text = encode(content);
System.out.println(text);
for (int i = 0; i < 10; ++i) {
perf(text);
}
}
Aggregations