How not to design a wire protocol

Richard Laager rlaager at wiktel.com
Thu Mar 7 19:50:20 UTC 2019


On 3/7/19 1:22 PM, Gary E. Miller via devel wrote:
> Yo Richard!
> 
> On Thu, 7 Mar 2019 11:06:58 -0600
> Richard Laager via devel <devel at ntpsec.org> wrote:
> 
>> On 3/7/19 12:56 AM, Eric S. Raymond via devel wrote:
>>> JSON is C is normally *very* awkward, vastly worse than Go, because
>>> full JSON parse needs to do fancy dancing with dynamic memory to
>>> handle heterogenous arrays. The good news is that I ran into this
>>> problem back in 2009 on GPSD, solved it then and spun it out as a
>>> little library, microjson.  
>>
>> ntpsec is already using (and embedding) libjsmn, right?
> 
> Sadly so.  I'd like to see it converted to microjson.
Is microjson something I can dynamically link against, or is it embed only?

Same question for libjsmn?

There's an outstanding item on my TODO list to investigate packaging
libjsmn separately for Debian and modifying ntpsec to dynamically link
against it. The Debian security team, in general, frowns on embedded
libraries, as it is a mess if there is a security bug in a library which
is commonly embedded.

-- 
Richard

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ntpsec.org/pipermail/devel/attachments/20190307/8c7fce33/attachment.bin>


More information about the devel mailing list