Package jsonvalues
Class MutableJsons
- java.lang.Object
-
- jsonvalues.MutableJsons
-
public class MutableJsons extends Object
Factory to create mutable jsons.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
MutableJsons.MutableJsArrays
represents a factory of mutable Json arraysclass
MutableJsons.MutableJsObjs
represents a factory of mutable Json objects
-
Field Summary
Fields Modifier and Type Field Description MutableJsons.MutableJsArrays
array
represents a factory of mutable Json arraysMutableJsons.MutableJsObjs
object
represents a factory of mutable Json objects
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Try
parse(String str)
Tries to parse the string into an immutable json.Try
parse(String str, ParseBuilder builder)
Tries to parse the string into an immutable json, performing the specified transformations while the parsing.Json<?>
toMutable(Json<?> json)
converts the given json using this factory to an mutable one, if it's not mutable, returning the same instance otherwise.
-
-
-
Field Detail
-
array
public final MutableJsons.MutableJsArrays array
represents a factory of mutable Json arrays
-
object
public final MutableJsons.MutableJsObjs object
represents a factory of mutable Json objects
-
-
Method Detail
-
toMutable
public Json<?> toMutable(Json<?> json)
converts the given json using this factory to an mutable one, if it's not mutable, returning the same instance otherwise.- Parameters:
json
- the given json- Returns:
- a mutable json
-
parse
public Try parse(String str)
Tries to parse the string into an immutable json.- Parameters:
str
- the string that will be parsed- Returns:
- a
Try
computation
-
parse
public Try parse(String str, ParseBuilder builder)
Tries to parse the string into an immutable json, performing the specified transformations while the parsing.- Parameters:
str
- the string that will be parsedbuilder
- a builder with the transformations that will be applied during the parsing- Returns:
- a
Try
computation
-
-