Commit 2364e443 authored by Karl Herbig's avatar Karl Herbig

Make pi compatible and add Codelite arm-linux-gnueabihf option

parent 0f2552ad
<?xml version="1.0" encoding="UTF-8"?>
<CodeLite_Project Name="JsonPP" InternalType="Library">
<CodeLite_Project Name="JsonPP" InternalType="Library" Version="10.0.0">
<Plugins>
<Plugin Name="qmake">
<![CDATA[00020001N0005Debug0000000000000001N0007Release000000000000]]>
<![CDATA[00040001N0005Debug0000000000000001N0007Release0000000000000001N0019Release_RaspberryPi0000000000000001N0014Release_Ubuntu000000000000]]>
</Plugin>
</Plugins>
<Description/>
......@@ -25,14 +25,55 @@
</Linker>
<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">
<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"/>
</Compiler>
<Linker Options="-s" Required="yes"/>
<ResourceCompiler Options="" Required="no"/>
<General OutputFile="$(IntermediateDirectory)/$(ProjectName).so" IntermediateDirectory="./Release" Command="" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="$(IntermediateDirectory)" PauseExecWhenProcTerminates="yes" IsGUIProgram="no" IsEnabled="yes"/>
<BuildSystem Name="Default"/>
<Environment EnvVarSetName="&lt;Use Defaults&gt;" DbgSetName="&lt;Use Defaults&gt;">
<![CDATA[]]>
</Environment>
<Debugger IsRemote="no" RemoteHostName="" RemoteHostPort="" DebuggerPath="" IsExtended="yes">
<DebuggerSearchPaths/>
<PostConnectCommands/>
<StartupCommands/>
</Debugger>
<PreBuild/>
<PostBuild/>
<CustomBuild Enabled="no">
<RebuildCommand/>
<CleanCommand/>
<BuildCommand/>
<PreprocessFileCommand/>
<SingleFileCommand/>
<MakefileGenerationCommand/>
<ThirdPartyToolName/>
<WorkingDirectory/>
</CustomBuild>
<AdditionalRules>
<CustomPostBuild/>
<CustomPreBuild/>
</AdditionalRules>
<Completion EnableCpp11="no" EnableCpp14="no">
<ClangCmpFlagsC/>
<ClangCmpFlags/>
<ClangPP/>
<SearchPaths/>
</Completion>
</Configuration>
<Configuration Name="Release_Ubuntu" CompilerType="GCC" DebuggerType="GNU gdb debugger" Type="Dynamic Library" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
<Compiler Options="-O1;-O;-O0;-O2;-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>
<Linker Options="-Os" Required="yes"/>
<Linker Options="-s" Required="yes"/>
<ResourceCompiler Options="" Required="no"/>
<General OutputFile="$(IntermediateDirectory)/$(ProjectName).so" IntermediateDirectory="./Release" Command="" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="$(IntermediateDirectory)" PauseExecWhenProcTerminates="yes" IsGUIProgram="no" IsEnabled="yes"/>
<BuildSystem Name="Default"/>
<Environment EnvVarSetName="&lt;Use Defaults&gt;" DbgSetName="&lt;Use Defaults&gt;">
<![CDATA[]]>
</Environment>
......
<?xml version="1.0" encoding="UTF-8"?>
<CodeLite_Workspace Name="JsonPP" Database="">
<CodeLite_Workspace Name="JsonPP" Database="" Version="10.0.0">
<Project Name="JsonPP" Path="JsonPP.project" Active="Yes"/>
<BuildMatrix>
<WorkspaceConfiguration Name="Release_Ubuntu" Selected="yes">
<Environment/>
<Project Name="JsonPP" ConfigName="Release_Ubuntu"/>
</WorkspaceConfiguration>
<WorkspaceConfiguration Name="Release_RaspberryPi" Selected="no">
<Environment/>
<Project Name="JsonPP" ConfigName="Release_RaspberryPi"/>
</WorkspaceConfiguration>
</BuildMatrix>
</CodeLite_Workspace>
../../LICENSE
\ No newline at end of file
The MIT License (MIT)
Copyright (c) 2016 Karl Blotnicki
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
......@@ -10,7 +10,6 @@ namespace Json {
class JsonPP
{
JsonPP();
static Value arrayFromString(std::string jsonArrayString);
public:
static Value objectFromString(std::string jsonString);
......
......@@ -455,7 +455,7 @@ Value JsonPP::objectFromString(std::string jsonString)
std::string JsonPP::stringFromObject ( Object& jsonObject )
{
auto jss = std::stringstream {};
std::stringstream jss;
jss << jsonObject;
return jss.str();
}
......
......@@ -29,9 +29,9 @@ Value::Value ( Array&& array ) : _type ( ValueType::Array ), _aryValue ( move(ar
Value::Value ( Object&& obj ) : _type ( ValueType::Object ), _objValue ( move(obj) ) {}
Value::Value ( std::nullptr_t np ) : _type ( ValueType::Null ) {}
Value::Value ( std::nullptr_t ) : _type ( ValueType::Null ) {}
Value::Value(const initializer_list<Value> list) : _type ( ValueType::Array ), _aryValue ( list ) {};
Value::Value(const initializer_list<Value> list) : _type ( ValueType::Array ), _aryValue ( list ) {}
Value::Value ( const Value& other )
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment