/** Create a safe copy of a {@link JsonValue}. * <p> * If the JsonValue is a structure (object or array), copy the structure recursively. * <p> * If the JsonValue is a primitive (string, number, boolean or null), * it is immutable so return the same object. */ public static JsonValue copy(JsonValue arg) { JsonBuilder builder = builder(arg) ; return builder==null ? arg : builder.build() ; }