Hi List,

I'm sure this is a trivial question, but ... you know ;-)

I need to serialize variables of different data types into one unnamed list.


Minimal example:
=== === === ===
struct ParticleFlight{
    char type;
    float energy;
}
void operator<<= (cxxtools::SerializationInfo& si, const ParticleFlight& pf) {
    ??????????
}
=== === === ===
... for JSON a datum
    pf={'e', 511.2};
should result in
{"jsonrpc": "2.0", "result": ['e', 511.2], "id": 4}
and
    v=vector<ParticleFlight>();
    v.push_back({'e', 78.9});
    v.push_back({'g', 1234.56});
in
{"jsonrpc": "2.0", "result": [ ['e', 78.9], ['g', 1234.56]], "id": 4}


According to the docs "An |Array| is just a list of unnamed values." but how to use?


Thanks ,
Sebastian


------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general

Reply via email to