spa-json: encode the string directly into the builder

Some special characters like '\v' are encoded using 6 characters, which currently does not work because the VLA size asumes a maximum of 4 characters per encoded special character. This patch refactors this logic to avoid using VLAs at all and encodes the string directly into the builder.

See #471 (closed)

Edited by Julian Bouzas

Merge request reports