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

Class Json

projects/Java/src/com/chronoxor/fbe/Json.java:105–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103
104// Fast Binary Encoding base JSON engine
105public final class Json
106{
107 private static final com.google.gson.Gson _engine;
108
109 // Get the JSON engine
110 public static com.google.gson.Gson getEngine() { return _engine; }
111
112 static
113 {
114 _engine = register(new com.google.gson.GsonBuilder()).create();
115 }
116
117 private Json() {}
118
119 public static com.google.gson.GsonBuilder register(com.google.gson.GsonBuilder builder)
120 {
121 builder.serializeNulls();
122 builder.registerTypeAdapter(java.nio.ByteBuffer.class, new ByteBufferJson());
123 builder.registerTypeAdapter(char.class, new CharacterJson());
124 builder.registerTypeAdapter(Character.class, new CharacterJson());
125 builder.registerTypeAdapter(java.util.Date.class, new DateJson());
126 builder.registerTypeAdapter(java.time.Instant.class, new InstantJson());
127 builder.registerTypeAdapter(java.math.BigDecimal.class, new BigDecimalJson());
128 builder.registerTypeAdapter(java.util.UUID.class, new UUIDJson());
129 return builder;
130 }
131}

Callers

nothing calls this directly

Calls 2

registerMethod · 0.95
createMethod · 0.80

Tested by

no test coverage detected