Can we represent bit fields in JSON/BSON?

Posted by zubair on Stack Overflow See other posts from Stack Overflow or by zubair
Published on 2012-10-06T08:47:11Z Indexed on 2012/10/06 9:37 UTC
Read the original article Hit count: 276

Filed under:
|
|
|

We have a dozen simulators talking to each other on UDP. The interface definition is managed in a database. The simulators are written using different languages; mostly C++, some in Java and C#. Currently, when systems engineer makes changes in the interface definition database, simulator developers manually update the communication data structures in their code. The data is mostly 2-5 bytes with bit fields for each signal. What I want to do is to generate one file from interface definition database describing byte and bit field definitions and let each developer add it to his simulator code with minimal fuss. I looked at JSON/BSON but couldn't find a way to represent bit fields in it.

Thanks

Zubair

© Stack Overflow or respective owner

Related posts about JSON

Related posts about bit-fields