Class JsonUnflattenerFactory
java.lang.Object
com.github.wnameless.json.unflattener.JsonUnflattenerFactory
JsonUnflattenerFactory preserves the configuration of a JsonUnflattener, in doing
so, any input JSON data can be used to create a JsonUnflattener object with the same
configuration.- Author:
- Wei-Ming Wu
-
Constructor Summary
ConstructorsConstructorDescriptionJsonUnflattenerFactory(Consumer<JsonUnflattener> configurer) Returns aJsonUnflattenerFactory.JsonUnflattenerFactory(Consumer<JsonUnflattener> configurer, com.github.wnameless.json.base.JsonCore<?> jsonCore) Returns aJsonUnflattenerFactory. -
Method Summary
Modifier and TypeMethodDescriptionCreates aJsonUnflattenerby given JSON reader and configures it with the configurer and jsonCore within thisJsonUnflattenerFactory.Creates aJsonUnflattenerby given JSON string and configures it with the configurer and jsonCore within thisJsonUnflattenerFactory.Creates aJsonUnflattenerby given flattenedMapand configures it with the configurer and jsonCore within thisJsonUnflattenerFactory.booleaninthashCode()toString()
-
Constructor Details
-
JsonUnflattenerFactory
Returns aJsonUnflattenerFactory.- Parameters:
configurer- a functional interface used to set up the configuration of aJsonUnflattener.
-
JsonUnflattenerFactory
public JsonUnflattenerFactory(Consumer<JsonUnflattener> configurer, com.github.wnameless.json.base.JsonCore<?> jsonCore) Returns aJsonUnflattenerFactory.- Parameters:
configurer- a functional interface used to set up the configuration of aJsonUnflattener.jsonCore- aJsonCore
-
-
Method Details
-
build
Creates aJsonUnflattenerby given JSON string and configures it with the configurer and jsonCore within thisJsonUnflattenerFactory.- Parameters:
json- the JSON string- Returns:
- a
JsonUnflattener
-
build
Creates aJsonUnflattenerby given flattenedMapand configures it with the configurer and jsonCore within thisJsonUnflattenerFactory.- Parameters:
flattenedMap- a flattenedMap- Returns:
- a
JsonUnflattener
-
build
Creates aJsonUnflattenerby given JSON reader and configures it with the configurer and jsonCore within thisJsonUnflattenerFactory.- Parameters:
jsonReader- a JSON reader- Returns:
- a
JsonUnflattener - Throws:
IOException- if the jsonReader cannot be read
-
hashCode
public int hashCode() -
equals
-
toString
-