@@ -3295,11 +3295,11 @@ public final CommandObject<String> jsonSet(String key, Path2 path, Object object
32953295 }
32963296
32973297 public final CommandObject <String > jsonSetWithEscape (String key , Path2 path , Object object ) {
3298- return new CommandObject <>(commandArguments (JsonCommand .SET ).key (key ).add (path ).add (GSON .toJson (object )), BuilderFactory .STRING );
3298+ return new CommandObject <>(commandArguments (JsonCommand .SET ).key (key ).add (path ).add (GsonJson .toJson (object )), BuilderFactory .STRING );
32993299 }
33003300
33013301 public final CommandObject <String > jsonSet (String key , Path path , Object pojo ) {
3302- return new CommandObject <>(commandArguments (JsonCommand .SET ).key (key ).add (path ).add (GSON .toJson (pojo )), BuilderFactory .STRING );
3302+ return new CommandObject <>(commandArguments (JsonCommand .SET ).key (key ).add (path ).add (GsonJson .toJson (pojo )), BuilderFactory .STRING );
33033303 }
33043304
33053305 public final CommandObject <String > jsonSetWithPlainString (String key , Path path , String string ) {
@@ -3311,11 +3311,11 @@ public final CommandObject<String> jsonSet(String key, Path2 path, Object object
33113311 }
33123312
33133313 public final CommandObject <String > jsonSetWithEscape (String key , Path2 path , Object object , JsonSetParams params ) {
3314- return new CommandObject <>(commandArguments (JsonCommand .SET ).key (key ).add (path ).add (GSON .toJson (object )).addParams (params ), BuilderFactory .STRING );
3314+ return new CommandObject <>(commandArguments (JsonCommand .SET ).key (key ).add (path ).add (GsonJson .toJson (object )).addParams (params ), BuilderFactory .STRING );
33153315 }
33163316
33173317 public final CommandObject <String > jsonSet (String key , Path path , Object pojo , JsonSetParams params ) {
3318- return new CommandObject <>(commandArguments (JsonCommand .SET ).key (key ).add (path ).add (GSON .toJson (pojo )).addParams (params ), BuilderFactory .STRING );
3318+ return new CommandObject <>(commandArguments (JsonCommand .SET ).key (key ).add (path ).add (GsonJson .toJson (pojo )).addParams (params ), BuilderFactory .STRING );
33193319 }
33203320
33213321 public final CommandObject <Object > jsonGet (String key ) {
@@ -3395,15 +3395,15 @@ public final CommandObject<Class<?>> jsonType(String key, Path path) {
33953395 }
33963396
33973397 public final CommandObject <Long > jsonStrAppend (String key , Object string ) {
3398- return new CommandObject <>(commandArguments (JsonCommand .STRAPPEND ).key (key ).add (GSON .toJson (string )), BuilderFactory .LONG );
3398+ return new CommandObject <>(commandArguments (JsonCommand .STRAPPEND ).key (key ).add (GsonJson .toJson (string )), BuilderFactory .LONG );
33993399 }
34003400
34013401 public final CommandObject <List <Long >> jsonStrAppend (String key , Path2 path , Object string ) {
3402- return new CommandObject <>(commandArguments (JsonCommand .STRAPPEND ).key (key ).add (path ).add (GSON .toJson (string )), BuilderFactory .LONG_LIST );
3402+ return new CommandObject <>(commandArguments (JsonCommand .STRAPPEND ).key (key ).add (path ).add (GsonJson .toJson (string )), BuilderFactory .LONG_LIST );
34033403 }
34043404
34053405 public final CommandObject <Long > jsonStrAppend (String key , Path path , Object string ) {
3406- return new CommandObject <>(commandArguments (JsonCommand .STRAPPEND ).key (key ).add (path ).add (GSON .toJson (string )), BuilderFactory .LONG );
3406+ return new CommandObject <>(commandArguments (JsonCommand .STRAPPEND ).key (key ).add (path ).add (GsonJson .toJson (string )), BuilderFactory .LONG );
34073407 }
34083408
34093409 public final CommandObject <Long > jsonStrLen (String key ) {
@@ -3442,15 +3442,15 @@ public final CommandObject<List<Long>> jsonArrAppend(String key, Path2 path, Obj
34423442 public final CommandObject <List <Long >> jsonArrAppendWithEscape (String key , Path2 path , Object ... objects ) {
34433443 CommandArguments args = commandArguments (JsonCommand .ARRAPPEND ).key (key ).add (path );
34443444 for (Object object : objects ) {
3445- args .add (GSON .toJson (object ));
3445+ args .add (GsonJson .toJson (object ));
34463446 }
34473447 return new CommandObject <>(args , BuilderFactory .LONG_LIST );
34483448 }
34493449
34503450 public final CommandObject <Long > jsonArrAppend (String key , Path path , Object ... pojos ) {
34513451 CommandArguments args = commandArguments (JsonCommand .ARRAPPEND ).key (key ).add (path );
34523452 for (Object pojo : pojos ) {
3453- args .add (GSON .toJson (pojo ));
3453+ args .add (GsonJson .toJson (pojo ));
34543454 }
34553455 return new CommandObject <>(args , BuilderFactory .LONG );
34563456 }
@@ -3460,11 +3460,11 @@ public final CommandObject<List<Long>> jsonArrIndex(String key, Path2 path, Obje
34603460 }
34613461
34623462 public final CommandObject <List <Long >> jsonArrIndexWithEscape (String key , Path2 path , Object scalar ) {
3463- return new CommandObject <>(commandArguments (JsonCommand .ARRINDEX ).key (key ).add (path ).add (GSON .toJson (scalar )), BuilderFactory .LONG_LIST );
3463+ return new CommandObject <>(commandArguments (JsonCommand .ARRINDEX ).key (key ).add (path ).add (GsonJson .toJson (scalar )), BuilderFactory .LONG_LIST );
34643464 }
34653465
34663466 public final CommandObject <Long > jsonArrIndex (String key , Path path , Object scalar ) {
3467- return new CommandObject <>(commandArguments (JsonCommand .ARRINDEX ).key (key ).add (path ).add (GSON .toJson (scalar )), BuilderFactory .LONG );
3467+ return new CommandObject <>(commandArguments (JsonCommand .ARRINDEX ).key (key ).add (path ).add (GsonJson .toJson (scalar )), BuilderFactory .LONG );
34683468 }
34693469
34703470 public final CommandObject <List <Long >> jsonArrInsert (String key , Path2 path , int index , Object ... objects ) {
@@ -3475,15 +3475,15 @@ public final CommandObject<List<Long>> jsonArrInsert(String key, Path2 path, int
34753475 public final CommandObject <List <Long >> jsonArrInsertWithEscape (String key , Path2 path , int index , Object ... objects ) {
34763476 CommandArguments args = commandArguments (JsonCommand .ARRINSERT ).key (key ).add (path ).add (index );
34773477 for (Object object : objects ) {
3478- args .add (GSON .toJson (object ));
3478+ args .add (GsonJson .toJson (object ));
34793479 }
34803480 return new CommandObject <>(args , BuilderFactory .LONG_LIST );
34813481 }
34823482
34833483 public final CommandObject <Long > jsonArrInsert (String key , Path path , int index , Object ... pojos ) {
34843484 CommandArguments args = commandArguments (JsonCommand .ARRINSERT ).key (key ).add (path ).add (index );
34853485 for (Object pojo : pojos ) {
3486- args .add (GSON .toJson (pojo ));
3486+ args .add (GsonJson .toJson (pojo ));
34873487 }
34883488 return new CommandObject <>(args , BuilderFactory .LONG );
34893489 }
@@ -4036,9 +4036,6 @@ public Map.Entry<T, Map<String, Object>> build(Object data) {
40364036 BuilderFactory .SEARCH_PROFILE_PROFILE .build (list .get (1 )));
40374037 }
40384038 }
4039-
4040- private static final Gson GSON = new Gson ();
4041-
40424039 private class GsonObjectBuilder <T > extends Builder <T > {
40434040
40444041 private final Class <T > clazz ;
@@ -4049,7 +4046,7 @@ public GsonObjectBuilder(Class<T> clazz) {
40494046
40504047 @ Override
40514048 public T build (Object data ) {
4052- return GSON .fromJson (BuilderFactory .STRING .build (data ), clazz );
4049+ return GsonJson .fromJson (BuilderFactory .STRING .build (data ), clazz );
40534050 }
40544051 }
40554052
@@ -4067,7 +4064,7 @@ public List<T> build(Object data) {
40674064 return null ;
40684065 }
40694066 List <String > list = BuilderFactory .STRING_LIST .build (data );
4070- return list .stream ().map (s -> GSON .fromJson (s , clazz )).collect (Collectors .toList ());
4067+ return list .stream ().map (s -> GsonJson .fromJson (s , clazz )).collect (Collectors .toList ());
40714068 }
40724069 }
40734070
0 commit comments