- public Object processAttribute(InputStream is)
- {
- try
- {
- /**
- * Read the JSON and create the variables
- */
- JsonParser parser = factory.createParser(is);
-
- JsonToken token = parser.nextToken();
-
- if (token == null)
- {
- LOG.warn("empty input-stream");
- return null;
- }
-
- Object result = convert(parser);
-
- if (parser.nextToken() != null)
- fail(parser, "unexpected data after parsed variables");
-
- return result;
- }
- catch (IOException e)
- {
- LOG.error("cannot parse input-stream as JSON: {}", e.getMessage());
- throw new RuntimeException(e);
- }
- }
-