File tree Expand file tree Collapse file tree 1 file changed +1
-32
lines changed
src/main/java/io/nats/client/support Expand file tree Collapse file tree 1 file changed +1
-32
lines changed Original file line number Diff line number Diff line change 18
18
import java .util .*;
19
19
20
20
import static io .nats .client .support .JsonEncoding .jsonEncode ;
21
+ import static io .nats .client .support .JsonUtils .*;
21
22
22
23
public class JsonValue implements JsonSerializable {
23
24
@@ -237,38 +238,6 @@ private String valueString(List<JsonValue> list) {
237
238
return endArray (sba ).toString ();
238
239
}
239
240
240
- private static void addField (StringBuilder sb , String fname , JsonSerializable value ) {
241
- if (value != null ) {
242
- sb .append ('"' );
243
- jsonEncode (sb , fname );
244
- sb .append ("\" :" ).append (value .toJson ()).append (COMMA );
245
- }
246
- }
247
-
248
- private static StringBuilder beginArray () {
249
- return new StringBuilder ("[" );
250
- }
251
-
252
- private static StringBuilder endJson (StringBuilder sb ) {
253
- int lastIndex = sb .length () - 1 ;
254
- if (sb .charAt (lastIndex ) == ',' ) {
255
- sb .setCharAt (lastIndex , '}' );
256
- return sb ;
257
- }
258
- sb .append ("}" );
259
- return sb ;
260
- }
261
-
262
- private static StringBuilder endArray (StringBuilder sb ) {
263
- int lastIndex = sb .length () - 1 ;
264
- if (sb .charAt (lastIndex ) == ',' ) {
265
- sb .setCharAt (lastIndex , ']' );
266
- return sb ;
267
- }
268
- sb .append ("]" );
269
- return sb ;
270
- }
271
-
272
241
@ Override
273
242
public boolean equals (Object o ) {
274
243
if (this == o ) return true ;
You can’t perform that action at this time.
0 commit comments