Commit Graph

15 Commits (695e5ddb246498545bc9b04f99ce6be849184b9c)

Author SHA1 Message Date
Kubernetes Submit Queue f98c06b1bb Merge pull request #33901 from jmcarp/issue-31984
Automatic merge from submit-queue

Escape special characters in jsonpath field names.

There may be a better way to do this, but this seemed like the simplest possible version.

Example: `{.items[*].metadata.labels.kubernetes\.io/hostname}`

[Resolves #31984]
2016-10-17 18:29:31 -07:00
Joshua Carp be3f556b77 Escape special characters in jsonpath field names.
Example: `{.items[*].metadata.labels.kubernetes\.io/hostname}`

[Resolves #31984]
2016-10-02 23:54:13 -04:00
Clayton Coleman bcea2c8a4e
Allow missing keys in jsonpath
It is common in constrained circumstances to prefer an empty string
result from JSONPath templates for missing keys over an error. Several
other implementations provide this (the canonical JS and PHP, as well as
the Java implementation).  This also mirrors gotemplate, which allows
Options("missingkey=zero").

Added simple check and simple test case.
2016-08-30 13:06:26 -04:00
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Avesh Agarwal d5e135e42c Fix jsonpath to handle maps with key of nonstring types 2016-03-22 17:32:40 -04:00
Clayton Coleman 33085c0cf2 Update tests to handle codec changes 2016-01-22 13:27:26 -05:00
Dai Zuozhuo ad5cc8b599 quote interpreted string 2015-11-19 11:15:10 +08:00
feisky 8ad6b8f035 Fix typo error 2015-10-12 18:57:56 +08:00
Daniel Martí 5f3aff2c43 Fix struct input test in jsonpath 2015-09-10 11:44:13 -07:00
Dai Zuozhuo 2e2ef3e830 change -o template to -o go-template=... 2015-09-05 22:30:47 +08:00
Dai Zuozhuo 9ccceac5e8 sort jsonpath_test results 2015-09-05 22:29:35 +08:00
Jerzy Szczepkowski 9d058c9e52 Commented-out flaky case of json path test.
Commented-out flaky case of json path test. Related to #13024.
2015-08-21 13:47:04 +02:00
Dai Zuozhuo 85972c44a4 jsonpath user guide docs 2015-08-20 09:11:04 +08:00
Dai Zuozhuo b61a905b19 add jsonpath to kubectl 2015-08-20 08:57:24 +08:00
Dai Zuozhuo 949704af2c jsonpath template 2015-07-28 10:17:56 +08:00