{ "info": { "author": "James Saryerwinnie", "author_email": "js@jamesls.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3" ], "description": "JMESPath\n========\n\nJMESPath (pronounced \"jaymz path\") allows you to declaratively specify how to\nextract elements from a JSON document.\n\nFor example, given this document::\n\n {\"foo\": {\"bar\": \"baz\"}}\n\nThe jmespath expression ``foo.bar`` will return \"baz\".\n\nJMESPath also supports:\n\nReferencing elements in a list. Given the data::\n\n {\"foo\": {\"bar\": [\"one\", \"two\"]}}\n\nThe expression: ``foo.bar[0]`` will return \"one\".\nYou can also reference all the items in a list using the ``*``\nsyntax::\n\n {\"foo\": {\"bar\": [{\"name\": \"one\"}, {\"name\": \"two\"}]}}\n\nThe expression: ``foo.bar[*].name`` will return [\"one\", \"two\"].\nNegative indexing is also supported (-1 refers to the last element\nin the list). Given the data above, the expression\n``foo.bar[-1].name`` will return [\"two\"].\n\nThe ``*`` can also be used for hash types::\n\n {\"foo\": {\"bar\": {\"name\": \"one\"}, \"baz\": {\"name\": \"two\"}}}\n\nThe expression: ``foo.*.name`` will return [\"one\", \"two\"].\n\n**NOTE: jmespath is being actively developed. There are a number\nof features it does not currently support that may be added in the\nfuture.**\n\n\nGrammar\n=======\n\nThe grammar is specified using ABNF, as described in `RFC4234`_\n\n::\n\n expression = sub-expression / index-expression / or-expression / identifier / \"*\"\n sub-expression = expression \".\" expression\n or-expression = expression \"||\" expression\n index-expression = expression bracket-specifier / bracket-specifier\n bracket-specifier = \"[\" (number / \"*\") \"]\"\n number = [-]1*digit\n digit = \"1\" / \"2\" / \"3\" / \"4\" / \"5\" / \"6\" / \"7\" / \"8\" / \"9\" / \"0\"\n identifier = 1*char\n char = unescaped /\n escape (\n %x20-2F / ; Space,!,\",#,$,%,&,',(,),*,+,comma,-,.,/\n %x3A-40 / ; :,;,<,=,>,?,@\n %x5B / ; Left bracket: [\n %x5C / ; Back slash: \\\n %x5D / ; Right bracket: ]\n %x5E / ; Caret: ^\n %x60 / ; Backtick: `\n %x7B-7E / ; {,|,},~\n b / ; backspace\n n / ; new line\n f / ; form feed\n r / ; carriage return\n t ) ; tab\n escape = %x5C ; Back slash: \\\n unescaped = %x30-39 / %x41-5A / %x5F / %x61-7A / %x7F-10FFFF\n\n\nTesting\n=======\n\nIn addition to the unit tests for the jmespath modules,\nthere is a ``tests/compliance`` directory that contains\n.json files with test cases. This allows other implementations\nto verify they are producing the correct output. Each json\nfile is grouped by feature.\n\nPython Library\n==============\n\nThe included python implementation has two convenience functions\nthat operate on python data structures. You can use ``search``\nand give it the jmespath expression and the data::\n\n >>> import jmespath\n >>> path = jmespath.search('foo.bar', {'foo': {'bar': 'baz'}})\n 'baz'\n\nSimilar to the ``re`` module, you can store the compiled expressions\nand reuse them to perform repeated searches::\n\n >>> import jmespath\n >>> path = jmespath.compile('foo.bar')\n >>> path.search({'foo': {'bar': 'baz'}})\n 'baz'\n >>> path.search({'foo': {'bar': 'other'}})\n 'other'\n\nYou can also use the ``jmespath.parser.Parser`` class directly\nif you want more control.\n\n\n.. _RFC4234: http://tools.ietf.org/html/rfc4234", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/boto/jamespath", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "jamespath", "package_url": "https://pypi.org/project/jamespath/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/jamespath/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/boto/jamespath" }, "release_url": "https://pypi.org/project/jamespath/0.0.1/", "requires_dist": null, "requires_python": null, "summary": "JSON Matching Expressions", "version": "0.0.1" }, "last_serial": 845216, "releases": { "0.0.1": [] }, "urls": [] }