Skip to content

Commit 7bf3737

Browse files
committed
Implement HTTPie Nested JSON v2
1 parent 21faddc commit 7bf3737

File tree

7 files changed

+667
-230
lines changed

7 files changed

+667
-230
lines changed

httpie/cli/argtypes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class KeyValueArgType:
5757

5858
def __init__(self, *separators: str):
5959
self.separators = separators
60-
self.special_characters = set('\\')
60+
self.special_characters = set()
6161
for separator in separators:
6262
self.special_characters.update(separator)
6363

@@ -113,7 +113,7 @@ def tokenize(self, s: str) -> List[Union[str, Escaped]]:
113113
There are only two token types - strings and escaped characters:
114114
115115
>>> KeyValueArgType('=').tokenize(r'foo\=bar\\baz')
116-
['foo', Escaped('='), 'bar', Escaped('\\'), 'baz']
116+
['foo', Escaped('='), 'bar\\\\baz']
117117
118118
"""
119119
tokens = ['']

httpie/cli/constants.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@
5252
SEPARATOR_GROUP_NESTED_JSON_ITEMS = frozenset([
5353
SEPARATOR_DATA_STRING,
5454
SEPARATOR_DATA_RAW_JSON,
55+
SEPARATOR_DATA_EMBED_FILE_CONTENTS,
56+
SEPARATOR_DATA_EMBED_RAW_JSON_FILE,
5557
])
5658

5759
# Separators allowed in ITEM arguments

httpie/cli/json_form.py

Lines changed: 0 additions & 150 deletions
This file was deleted.

0 commit comments

Comments
 (0)