MCPcopy Create free account
hub / github.com/chronoxor/FastBinaryEncoding / Json

Class Json

projects/Java/src/com/chronoxor/proto/fbe/Json.java:11–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9
10// Fast Binary Encoding proto JSON engine
11public final class Json
12{
13 private static final com.google.gson.Gson _engine;
14
15 // Get the JSON engine
16 public static com.google.gson.Gson getEngine() { return _engine; }
17
18 static
19 {
20 _engine = register(new com.google.gson.GsonBuilder()).create();
21 }
22
23 private Json() {}
24
25 public static com.google.gson.GsonBuilder register(com.google.gson.GsonBuilder builder)
26 {
27 com.chronoxor.fbe.Json.register(builder);
28 builder.registerTypeAdapter(com.chronoxor.proto.OrderSide.class, new OrderSideJson());
29 builder.registerTypeAdapter(com.chronoxor.proto.OrderType.class, new OrderTypeJson());
30 builder.registerTypeAdapter(com.chronoxor.proto.State.class, new StateJson());
31 return builder;
32 }
33}

Callers

nothing calls this directly

Calls 2

registerMethod · 0.95
createMethod · 0.80

Tested by

no test coverage detected