Tidy-up and correct logic around writing JSON encoded strings. related #13832 Change-Id: I1eca33e11dff4457f85a896c02331c1cd9ae1110 Reviewed-on: https://review.haiku-os.org/617 Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Addition of missing files from previous commit