eval/decode: Add support for special maps

Special dictionaries representing map are created when encountering duplicate
key or when key is empty or contains NUL.

Also checks that values are separated by a comma/colon properly.
This commit is contained in:
ZyX
2016-02-05 02:29:10 +03:00
parent 2c378fdfaf
commit e303ea8a19
3 changed files with 233 additions and 61 deletions

View File

@@ -897,6 +897,7 @@ static inline int convert_to_json_string(garray_T *const gap,
size_t len_ = len;
char *tofree = NULL;
if (last_p_enc != (const void *) p_enc) {
p_enc_conv.vc_type = CONV_NONE;
convert_setup(&p_enc_conv, p_enc, "utf-8");
p_enc_conv.vc_fail = true;
last_p_enc = p_enc;