Skip to content
Permalink
Browse files

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.
  • Loading branch information...
dwsteele committed Apr 22, 2019
1 parent f100ea0 commit 81f652137c8f3179aad24d3283a4141b0075ae66
@@ -25,6 +25,10 @@
<p>Only process next filter in <code>IoFilterGroup</code> when input buffer is full or flushing.</p>
</release-item>

<release-item>
<p>Add separate functions to encode/decode each JSON type.</p>
</release-item>

<release-item>
<p>Add macros to create constant <code>Buffer</code> objects.</p>
</release-item>
@@ -404,7 +404,7 @@ config/parse.o: config/parse.c common/assert.h common/debug.h common/error.auto.
config/protocol.o: config/protocol.c common/assert.h common/debug.h common/error.auto.h common/error.h common/io/filter/filter.h common/io/filter/group.h common/io/io.h common/io/read.h common/io/write.h common/lock.h common/log.h common/logLevel.h common/memContext.h common/stackTrace.h common/time.h common/type/buffer.h common/type/convert.h common/type/keyValue.h common/type/string.h common/type/stringList.h common/type/variant.h common/type/variantList.h config/config.auto.h config/config.h config/define.auto.h config/define.h config/protocol.h protocol/client.h protocol/command.h protocol/server.h
$(CC) $(CFLAGS) -c config/protocol.c -o config/protocol.o

info/info.o: info/info.c common/assert.h common/crypto/cipherBlock.h common/crypto/common.h common/crypto/hash.h common/debug.h common/error.auto.h common/error.h common/ini.h common/io/filter/filter.h common/io/filter/group.h common/io/read.h common/io/write.h common/log.h common/logLevel.h common/memContext.h common/stackTrace.h common/time.h common/type/buffer.h common/type/convert.h common/type/keyValue.h common/type/string.h common/type/stringList.h common/type/variant.h common/type/variantList.h info/info.h storage/fileRead.h storage/fileWrite.h storage/helper.h storage/info.h storage/storage.h version.h
info/info.o: info/info.c common/assert.h common/crypto/cipherBlock.h common/crypto/common.h common/crypto/hash.h common/debug.h common/error.auto.h common/error.h common/ini.h common/io/filter/filter.h common/io/filter/group.h common/io/read.h common/io/write.h common/log.h common/logLevel.h common/memContext.h common/stackTrace.h common/time.h common/type/buffer.h common/type/convert.h common/type/json.h common/type/keyValue.h common/type/string.h common/type/stringList.h common/type/variant.h common/type/variantList.h info/info.h storage/fileRead.h storage/fileWrite.h storage/helper.h storage/info.h storage/storage.h version.h
$(CC) $(CFLAGS) -c info/info.c -o info/info.o

info/infoArchive.o: info/infoArchive.c common/assert.h common/crypto/common.h common/debug.h common/error.auto.h common/error.h common/ini.h common/io/filter/filter.h common/io/filter/group.h common/io/read.h common/io/write.h common/log.h common/logLevel.h common/memContext.h common/stackTrace.h common/time.h common/type/buffer.h common/type/convert.h common/type/keyValue.h common/type/string.h common/type/stringList.h common/type/variant.h common/type/variantList.h info/infoArchive.h info/infoPg.h postgres/interface.h storage/fileRead.h storage/fileWrite.h storage/helper.h storage/info.h storage/storage.h
@@ -613,7 +613,7 @@ infoRender(void)
}
// Format json output
else
resultStr = varToJson(varNewVarLst(infoList), 4);
resultStr = jsonFromVar(varNewVarLst(infoList), 4);

memContextSwitch(MEM_CONTEXT_OLD());
result = strDup(resultStr);
Oops, something went wrong.

0 comments on commit 81f6521

Please sign in to comment.
You can’t perform that action at this time.