Example #1
0
 @Override
 public BOS deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context)
     throws JsonParseException {
   return BOS.findByValue(json.getAsInt());
 }
Example #2
0
 @Override
 public JsonElement serialize(BOS state, Type arg1, JsonSerializationContext arg2) {
   return new JsonPrimitive(state.ordinal());
 }