Class JsonFlattenerFactory
java.lang.Object
com.github.wnameless.json.flattener.JsonFlattenerFactory
JsonFlattenerFactory preserves the configuration of a JsonFlattener, in doing so,
any input JSON data can be used to create a JsonFlattener object with the same
configuration.- Author:
- Wei-Ming Wu
-
Constructor Summary
ConstructorsConstructorDescriptionJsonFlattenerFactory(Consumer<JsonFlattener> configurer) Returns aJsonFlattenerFactory.JsonFlattenerFactory(Consumer<JsonFlattener> configurer, com.github.wnameless.json.base.JsonCore<?> jsonCore) Returns aJsonFlattenerFactory. -
Method Summary
Modifier and TypeMethodDescriptionbuild(com.github.wnameless.json.base.JsonValueBase<?> json) Creates aJsonFlattenerby givenJsonValueBaseand configures it with the configurer and jsonCore within thisJsonFlattenerFactory.Creates aJsonFlattenerby given JSON reader and configures it with the configurer and jsonCore within thisJsonFlattenerFactory.Creates aJsonFlattenerby given JSON string and configures it with the configurer and jsonCore within thisJsonFlattenerFactory.booleaninthashCode()toString()
-
Constructor Details
-
JsonFlattenerFactory
Returns aJsonFlattenerFactory.- Parameters:
configurer- a functional interface used to set up the configuration of aJsonFlattener.
-
JsonFlattenerFactory
public JsonFlattenerFactory(Consumer<JsonFlattener> configurer, com.github.wnameless.json.base.JsonCore<?> jsonCore) Returns aJsonFlattenerFactory.- Parameters:
configurer- a functional interface used to set up the configuration of aJsonFlattener.jsonCore- aJsonCore
-
-
Method Details
-
build
Creates aJsonFlattenerby given JSON string and configures it with the configurer and jsonCore within thisJsonFlattenerFactory.- Parameters:
json- the JSON string- Returns:
- a
JsonFlattener
-
build
Creates aJsonFlattenerby givenJsonValueBaseand configures it with the configurer and jsonCore within thisJsonFlattenerFactory.- Parameters:
json- theJsonValueBase- Returns:
- a
JsonFlattener
-
build
Creates aJsonFlattenerby given JSON reader and configures it with the configurer and jsonCore within thisJsonFlattenerFactory.- Parameters:
jsonReader- a JSON reader- Returns:
- a
JsonFlattener - Throws:
IOException- if the jsonReader cannot be read
-
hashCode
public int hashCode() -
equals
-
toString
-