Platform | Linux | Windows |
---|---|---|
Build status |
PJSettings is a small library that extends a PJSIP persistent document interfaces to support:
- read/write xml document non-serially, based on pugixml backend
- read/write json document non-serially, based on jsoncpp backend
Inspite PJSUA2 already has implementation for read/write json documents, PJSUA2 pj::JsonDocument is read and written serially, hence the order of reading must be the same as the order of writing.
This library provides classes capable reading of documents in non-serial way.
For example, you can read pj::LogConfig object from this json document in usual serial way:
{
"LogConfig": {
"msgLogging": 1,
"level": 5,
"consoleLevel": 4,
"decor": 25328,
"filename": "pjsip.log",
"fileFlags": 0
}
}
or you can have just small part of fields, and can reorder them on your own:
{
"LogConfig": {
"filename": "pjsip.log",
"level": 5,
"consoleLevel": 4
}
}
Same xml document will look as
<?xml version="1.0"?>
<root>
<LogConfig filename="pjsip.log"
level="5"
consolelevel="4" />
</root>
For more details, please read
This library use great libraries to work well (in alphabetical order):
- catch by Two Blue Cubes Ltd. for unit testing
- jsoncpp by Baptiste Lepilleur for json backend
- pjsip by Benny Prijono and Teluu Inc. for persistent APIs
- pugixml by Arseny Kapoulkine for xml backend
PJSettings library is distributed under MIT license
Copyright (C) 2014, by halex2005
Report bugs and download new versions at https://github.com/halex2005/pjsettings
Note that PJSettings library is built on to of PJSUA2 subset of PJSIP library. Please, look at PJSIP license options if you would use PJSettings library.