Encoding a series of messages in JSON is similar to encoding
a series of messages in any other set of encoding rules: iterate
through the input data using a loop, using rtxMemReset
to improve performance by reusing memory:
/* initialize context, et c. */ for ( ; ; ) { /* initialize / populate message structure to be encoded */ /* call MDEREnc_<messageType> (...); */ /* call rtxMemReset when finished encoding: */ rtxMemReset (pctxt); }