Klasse ImixsJSONParser
The method 'parse()' returns in any case a collection of ItemCollection.
- Autor:
- rsoika
-
Feldübersicht
Felder -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic final List<ItemCollection> parse(InputStream jsonDataStream) This method parses an Imixs JSON input stream and returns a List of Imixs ItemCollection instances.
-
Felddetails
-
DATA_ELEMENT
- Siehe auch:
-
ITEM_ELEMENT
- Siehe auch:
-
NAME_ELEMENT
- Siehe auch:
-
VALUE_ELEMENT
- Siehe auch:
-
-
Konstruktordetails
-
ImixsJSONParser
public ImixsJSONParser()
-
-
Methodendetails
-
parse
public static final List<ItemCollection> parse(InputStream jsonDataStream) throws ParseException, UnsupportedEncodingException This method parses an Imixs JSON input stream and returns a List of Imixs ItemCollection instances.The method supports both - a single document (item element) or a collection of documents (data element). In both cases the method returns a collection of ItemCollections Example-1:
{ "item":[ {"name":"$isauthor","value":{"@type":"xs:boolean","$":"true"}}, {"name":"$readaccess","value":{"@type":"xs:string","$":"Anna"}}, {"name":"txtmessage","value":{"@type":"xs:string","$":"worklist"}}, {"name":"txtlog","value":[ {"@type":"xs:string","$":"A"}, {"@type":"xs:string","$":"B"}, {"@type":"xs:string","$":"C"}] }, {"name":"$activityid","value":{"@type":"xs:int","$":"0"}} ] }Example-2:{ "data": [ { "item":[ {"name":"$isauthor","value":{"@type":"xs:boolean","$":"true"}}, {"name":"$readaccess","value":{"@type":"xs:string","$":"Anna"}} ] }, { "item":[ {"name":"$isauthor","value":{"@type":"xs:boolean","$":"true"}}, {"name":"$readaccess","value":{"@type":"xs:string","$":"Anna"}} ] } ] }- Parameter:
requestBodyStream-encoding- - default encoding use to parse the stream- Gibt zurück:
- a workitem
- Löst aus:
ParseExceptionUnsupportedEncodingException
-