diff options
| author | Maxime Coste <mawww@kakoune.org> | 2023-11-03 20:27:41 +1100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2023-11-03 20:27:41 +1100 |
| commit | f7499ccf45315a57b65f7c176ba23a8265ae01cf (patch) | |
| tree | f52003b20b462c00e50faa2dee37997eb11bbd17 /src/json.hh | |
| parent | 7577fa1b668ea81eb9b7b9af690a4161187129dd (diff) | |
Add support for 0-padding in format and replace uses of sprintf
Diffstat (limited to 'src/json.hh')
| -rw-r--r-- | src/json.hh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/json.hh b/src/json.hh index 1f76739c..84c14d36 100644 --- a/src/json.hh +++ b/src/json.hh @@ -11,6 +11,10 @@ namespace Kakoune using JsonArray = Vector<Value>; using JsonObject = HashMap<String, Value>; +String to_json(int i); +String to_json(bool b); +String to_json(StringView str); + template<typename T> String to_json(ArrayView<const T> array) { @@ -27,10 +31,6 @@ String to_json(const HashMap<K, V, D>& map) ',', false) + "}"; } -String to_json(int i); -String to_json(bool b); -String to_json(StringView str); - struct JsonResult { Value value; const char* new_pos; }; JsonResult parse_json(const char* pos, const char* end); |
