Simplify JSON unicode serialization

It’s just an array of codepoints; no need to turn them into objects
This commit is contained in:
Simon Cozens 2020-09-18 09:49:19 +01:00 committed by Behdad Esfahbod
parent 57a528ab2c
commit bb7b634cd0
1 changed files with 0 additions and 5 deletions

View File

@ -214,13 +214,8 @@ _hb_buffer_serialize_unicode_json (hb_buffer_t *buffer,
if (i) if (i)
*p++ = ','; *p++ = ',';
*p++ = '{';
APPEND ("\"u\":");
p += hb_max (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), "%u", info[i].codepoint)); p += hb_max (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), "%u", info[i].codepoint));
*p++ = '}';
unsigned int l = p - b; unsigned int l = p - b;
if (buf_size > l) if (buf_size > l)
{ {