Uploaded image for project: 'Spring Integration'
  1. Spring Integration
  2. INT-4461

Add support for JSON in byte[] to JsonPathUtils

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 5.0.4
    • Fix Version/s: 5.1 M1, 5.0.5, 4.3.16
    • Component/s: Core
    • Labels:

      Description

      public static void main(String[] args) throws Exception {
      	byte[] json = "{\"foo\":\"bar\"}".getBytes();
      	System.out.println(JsonPathUtils.evaluate(json, "$.foo").toString());
      }
      

       

      Exception in thread "main" com.jayway.jsonpath.PathNotFoundException: Expected to find an object with property ['foo'] in path $ but found '[B'. This is not a json object according to the JsonProvider: 'com.jayway.jsonpath.spi.json.JsonSmartJsonProvider'.
       

        Attachments

          Activity

            People

            • Assignee:
              grussell Gary Russell
              Reporter:
              grussell Gary Russell
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: