MCPcopy Create free account
hub / github.com/httpie/cli / wrap_with_dict

Function wrap_with_dict

httpie/cli/nested_json/interpret.py:107–116  ·  view source on GitHub ↗
(context)

Source from the content-addressed store, hash-verified

105
106
107def wrap_with_dict(context):
108 if context is None:
109 return {}
110 elif isinstance(context, list):
111 return {
112 EMPTY_STRING: NestedJSONArray(context),
113 }
114 else:
115 assert isinstance(context, dict)
116 return context
117
118
119def unwrap_top_level_list_if_needed(data: dict):

Callers 1

interpret_nested_jsonFunction · 0.85

Calls 1

NestedJSONArrayClass · 0.85

Tested by

no test coverage detected