Introduce RestReader#isValue()

This method allows to handle object "values", which are supported
by XML, but not directly by JSON. In XML the following is a valid
object:

  <object a="b">value</object>

There is no equivalent way to express that in JSON, but throughout
the Skalli REST API the same object would be rendered in JSON as

  "object":{"a":"b","value":"value"}

The new method allows parsing of such objects independently of
the concrete media type:

  json.object()
  while (json.hasMore()) {
      if (json.isKey("a")) {
          a = json.attributeString();
      } else if (json.isValue()) {
          value = json.valueString();
      } else {
          // unexpected
      }
  }
  json.end()

Change-Id: I2cd0253c62377367fdaa423634710d456d6336bc
Signed-off-by: Michael Ochmann <michael.ochmann@sap.com>
3 files changed