public class ParseOptions extends Object
Constructor | Description |
---|---|
ParseOptions() |
Modifier and Type | Method | Description |
---|---|---|
static ParseOptions |
builder() |
static factory method to create a builder to customize the parsing of a string into a json.
|
ParseOptions |
withElemFilter(Predicate<? super JsPair> filter) |
adds a predicate to this builder to filter the elements of the json to be parsed, removing those
pairs that are evaluated to false on the predicate.
|
ParseOptions |
withElemMap(Function<JsPair,JsElem> map) |
adds a function to this builder to map the elements of the json to be parsed
|
ParseOptions |
withKeyFilter(Predicate<JsPath> keyFilter) |
adds a function to this builder to filter the keys of the json to be parsed.
|
ParseOptions |
withKeyMap(UnaryOperator<String> keyMap) |
adds a function to this builder to map the keys of the json to be parsed.
|
public static ParseOptions builder()
public ParseOptions withElemFilter(Predicate<? super JsPair> filter)
filter
- the predicate to filter pair of elements.public ParseOptions withKeyFilter(Predicate<JsPath> keyFilter)
keyFilter
- the predicate to filterpublic ParseOptions withKeyMap(UnaryOperator<String> keyMap)
keyMap
- the map function which takes as input the name of the key and returns the new key namepublic ParseOptions withElemMap(Function<JsPair,JsElem> map)
map
- the map function which takes as input a JsPair and returns the new JsElemCopyright © 2019. All rights reserved.