1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-06-18 23:57:33 +02:00

Add separate functions to encode/decode each JSON type.

In most cases the JSON type is known so this is more efficient than converting to Variant first, both in terms of memory and time.

Also rename some of the existing functions for consistency.
This commit is contained in:
David Steele
2019-04-22 18:41:01 -04:00
parent f100ea0ff4
commit 81f652137c
16 changed files with 704 additions and 294 deletions

View File

@ -285,7 +285,7 @@ testRun(void)
// Various bogus greetings
TEST_ERROR(
protocolClientNew(strNew("test client"), strNew("test"), read, write), JsonFormatError,
"invalid type at 'bogus greeting'");
"expected '{' at 'bogus greeting'");
TEST_ERROR(
protocolClientNew(strNew("test client"), strNew("test"), read, write), ProtocolError,
"greeting key 'name' must be string type");