|
Docmosis API 4.9.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.docmosis.template.population.MemoryDataProvider
com.docmosis.template.population.JSONDataProvider
public class JSONDataProvider
A MemoryDataProvider that can load itself from JSON formatted data.
| Constructor Summary | |
|---|---|
JSONDataProvider()
|
|
JSONDataProvider(String jsonString,
StringInterceptor[] interceptors)
Construct a data provider from a JSON string. |
|
| Method Summary | |
|---|---|
String |
toJSONString()
Convert this Data Provider into a JSON string. |
static String |
toJSONString(MemoryDataProvider dp)
Convert the given Data Provider into a JSON string. |
String |
toStringPretty()
Convert this Data Provider into a Pretty JSON string. |
| Methods inherited from class com.docmosis.template.population.MemoryDataProvider |
|---|
addDataProvider, cleanup, finalize, getBoolean, getBooleanKeys, getDataProvider, getDataProviderCount, getDataProviderKeys, getImage, getImageKeys, getRealKey, getString, getStringKeys, hasBooleanKey, hasDataProviderKey, hasImageKey, hasStringKey, setBoolean, setFalse, setImage, setImage, setString, setTrue, toDebugString, toDebugString, toDebugString, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public JSONDataProvider()
public JSONDataProvider(String jsonString,
StringInterceptor[] interceptors)
throws JSONException
jsonString - the JSON string.interceptors - an array of interceptors that have the opportunity to
interpret the given key and value and add the data to this data provider
in a different form.
JSONException| Method Detail |
|---|
public String toJSONString()
throws JSONException
JSONException - for serious unexpected errors.
ClassCastException - if any sub data provider of dp is not a MemoryDataProvider
(or subclass).public String toStringPretty()
toStringPretty in interface DataProvidertoStringPretty in class MemoryDataProviderJSONException - for serious unexpected errors.
ClassCastException - if any sub data provider of dp is not a MemoryDataProvider
(or subclass).
public static String toJSONString(MemoryDataProvider dp)
throws JSONException
dp - the data provider to convert (must be a MemoryDataProvider or subclass).
JSONException - for serious unexpected errors.
ClassCastException - if any sub data provider of dp is not a MemoryDataProvider
(or subclass).
|
Docmosis API 4.9.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||