public class JSONParser extends Object
The method parseWorkitem translates a JSON structure containing a Imixs Document into a ItemCollection.
Constructor and Description |
---|
JSONParser() |
Modifier and Type | Method and Description |
---|---|
static String |
getKey(String key,
String json)
This method extracts a single key from a JSON structure.
|
static ItemCollection |
parseWorkitem(InputStream requestBodyStream,
String _encoding)
Deprecated.
|
public static String getKey(String key, String json)
It is also possible to get a JSON object or an JSON array embedded in the given JSON structure. This object can be parsed again with this method.
key
- json
- @Deprecated public static final ItemCollection parseWorkitem(InputStream requestBodyStream, String _encoding) throws ParseException, UnsupportedEncodingException
{
"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"}}
]
}
requestBodyStream
- encoding
- - default encoding use to parse the streamParseException
UnsupportedEncodingException
Copyright © 2006–2022 Imixs Software Solutions GmbH. All rights reserved.