...
 
Commits (3)
......@@ -26,6 +26,7 @@
<ResourceCompiler Options=""/>
</GlobalSettings>
<Configuration Name="Release_RaspberryPi" CompilerType="Cross GCC ( arm-linux-gnueabihf )" DebuggerType="GNU gdb debugger" Type="Dynamic Library" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
<Configuration Name="Release_RaspberryPi" CompilerType="Cross GCC (arm-linux-gnueabihf)" DebuggerType="GNU gdb debugger" Type="Dynamic Library" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
<Compiler Options="-pedantic-errors;-Wfatal-errors;-O1;-pedantic;-W;-std=c++11;-Wall;-fPIC" C_Options="" Assembler="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" PCHFlags="" PCHFlagsPolicy="0">
<IncludePath Value="."/>
<IncludePath Value="../../include"/>
......@@ -66,7 +67,7 @@
</Completion>
</Configuration>
<Configuration Name="Release_Ubuntu" CompilerType="GCC" DebuggerType="GNU gdb debugger" Type="Dynamic Library" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
<Compiler Options="-pedantic-errors;-O1;-pedantic;-W;-std=c++14;-Wall;-fPIC" C_Options="" Assembler="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" PCHFlags="" PCHFlagsPolicy="0">
<Compiler Options="-pedantic-errors;-Wfatal-errors;-O1;-pedantic;-W;-std=c++14;-Wall;-fPIC" C_Options="" Assembler="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" PCHFlags="" PCHFlagsPolicy="0">
<IncludePath Value="."/>
<IncludePath Value="../../include"/>
</Compiler>
......
../../LICENSE
\ No newline at end of file
The MIT License (MIT)
Copyright (c) 2018 Karl Herbig
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
../../README.md
\ No newline at end of file
JsonPP
======
A C++ Library providing a 'std::string' parser for JavaScript Object Notation. The STL container are in favor to represent the Json entities: Object, Array and Value.
Requirements
------------
C++11/14 standard is required to compile the library.
Code Example
------------
Json:
```json
{
"user_name":"ccdMuro"
"user_data":{
"hobbys":["hacking", "gaming"],
"age":99
}
}
```
C++:
```C++
#include <JsonPP.h>
using namespace Ccd::Json;
...
/* get your Json somehow and store it into the std::string */
...
auto jsonObject = JsonPP::objectFromString(myJsonString);
/* now access the object values with the subscript operator[] */
auto userName = jsonObject["user_name"].toString();
auto userAge = jsonObject["user_data"]["age"].toInt();
auto hobbys = std::vector{};
for ( auto item : jsonObject["user_data"]["hobbys"]){
hobbys = item.toString();
}
```
\ No newline at end of file
......@@ -22,7 +22,7 @@ Json:
```
C++:
```C++
```cpp
#include <JsonPP.h>
using namespace Ccd::Json;
......
......@@ -33,7 +33,11 @@ Value::Value ( Object&& obj ) : _type ( ValueType::Object ), _objValue ( move (
Value::Value ( std::nullptr_t ) : _type ( ValueType::Null ) {}
<<<<<<< HEAD
Value::Value ( const initializer_list<Value> list ) : _type ( ValueType::Array ), _aryValue ( list ) {}
=======
Value::Value(const initializer_list<Value> list) : _type ( ValueType::Array ), _aryValue ( list ) {}
>>>>>>> fc06715cdf035e9d87b66c5410867101247fc219
Value::Value ( const Value& other )
{
......