packages feed

jsonpath-0.3.0.0: test/resources/json-path-tests/IndexedSubscriptOperator.json

{
    "title" : "Indexed Subscript Operator",
    "data" : [
        "John Doe",
        36,
        "Architect",
        "one",
        "three",
        "five",
        {"string": "str", "array": ["arr"]}
    ],
    "tests" : [{
        "path" : "$[2]",
            "result" : ["Architect"]
         }, {
            "path" : "$[ 2 ]",
            "result" : ["Architect"]
        },{
            "path" : "$[-1]",
            "result" : [{"string": "str", "array": ["arr"]}]
        }, {
            "path" : "$[10]",
            "result" : []
        }, {
            "path" : "$[1:4]",
            "result" : [36, "Architect", "one"]
        }, {
            "path" : "$[1:4:2]",
            "result" : [36, "one"]
        }, {
            "path" : "$[ 1 : 4 : 2 ]",
            "result" : [36, "one"]
        }, {
            "path" : "$[:4:2]",
            "result" : ["John Doe", "Architect"]
        }, {
            "path" : "$[1::2]",
            "result" : [36, "one", "five"]
        }, {
            "path" : "$[::2]",
            "result" : ["John Doe", "Architect", "three", {"string": "str", "array": ["arr"]}]
        }, {
            "path" : "$[1:]",
            "result" : [36, "Architect", "one", "three", "five", {"string": "str", "array": ["arr"]}]
        }, {
            "path" : "$[:3]",
            "result" : ["John Doe", 36, "Architect"]
        }, {
            "path" : "$[0,3]",
            "result" : ["John Doe", "one"]
        }, {
            "path" : "$[0,1::2]",
            "result" : ["John Doe", 36, "one", "five"]
        }, {
            "path" : "$[0:2,4:6]",
            "result" : ["John Doe", 36, "three", "five"]
        }, {
            "path" : "$[0:2,4]",
            "result" : ["John Doe", 36, "three"]
        }, {
            "path" : "$[ 0:2 , 4]",
            "result" : ["John Doe", 36, "three"]
        }, {
            "path" : "$[0:2, 'foo']",
            "result" : ["John Doe", 36]
        }, {
            "path" : "$[-1]['string', 'array']",
            "result" : ["str", ["arr"]]
        }, {
            "path" : "$[-1][\"not-here\", \"array\", \"string\"]",
            "result" : [["arr"], "str"]
        }, {
            "path" : "$[*]",
            "result" : ["John Doe", 36, "Architect", "one", "three", "five", {"string": "str", "array": ["arr"]}]
        }, {
            "path": "$[2:113667776004]",
            "result": ["Architect", "one", "three", "five", {"string": "str", "array": ["arr"]}]
        }, {
            "path": "$[-113667776004:2]",
            "result": ["John Doe", 36]
        }, {
            "path": "$[::0]",
            "result": []
        }, {
            "path": "$[5:0:-1]",
            "result": [
                "five",
                "three",
                "one",
                "Architect",
                36
            ]
        }, {
            "path": "$[-1:0:-1]",
            "result": [
                "five",
                "three",
                "one",
                "Architect",
                36,
                {"string": "str", "array": ["arr"]}
            ]
        }, {
            "path": "$[::-2]",
            "result": [
                {"string": "str", "array": ["arr"]},
                "three",
                "Architect",
                "John Doe"
            ]
        }, {
            "path": "$[::]",
            "result": [
                "John Doe",
                36,
                "Architect",
                "one",
                "three",
                "five",
                {"string": "str", "array": ["arr"]}
            ]
        }
    ]
}