Package org.apache.juneau.marshall
Class BeanMapLoader
java.lang.Object
org.apache.juneau.marshall.BeanMapLoader
Marshalling-side helper for loading
BeanMap contents from JSON text or a reader/parser pair.
Example:
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> BeanMap<T>load(BeanMap<T> m, Reader r, ReaderParser p) Populates the suppliedBeanMapwith the contents of the reader using the specifiedReaderParser.static <T> BeanMap<T>Populates the suppliedBeanMapwith the contents of the JSON text ininput.
-
Method Details
-
load
Populates the suppliedBeanMapwith the contents of the JSON text ininput.Equivalent to the legacy
BeanMap.load(String)method.- Type Parameters:
T- The bean type.- Parameters:
m- The bean map to populate. Must not benull .input- The text that will get parsed into a map and then added tom. Can benull (nothing is added).- Returns:
- The supplied bean map for fluent chaining.
- Throws:
ParseException- Malformed input encountered.
-
load
Populates the suppliedBeanMapwith the contents of the reader using the specifiedReaderParser.Equivalent to the legacy
BeanMap.load(Reader, ReaderParser)method.- Type Parameters:
T- The bean type.- Parameters:
m- The bean map to populate. Must not benull .r- The reader containing serialized text. Can benull (nothing is added).p- The parser to use to parse the text.- Returns:
- The supplied bean map for fluent chaining.
- Throws:
ParseException- Malformed input encountered.
-