-
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
261 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"configurations": [ | ||
{ | ||
"name": "Win32", | ||
"includePath": [ | ||
"${workspaceFolder}\\lwjson\\src\\include", | ||
"${workspaceFolder}\\dev\\VisualStudio", | ||
"${workspaceFolder}" | ||
], | ||
"defines": [ | ||
"_DEBUG", | ||
"UNICODE", | ||
"_UNICODE" | ||
], | ||
"compilerPath": "C:\\MinGW\\bin\\gcc.exe", | ||
"cStandard": "gnu17", | ||
"cppStandard": "gnu++14", | ||
"intelliSenseMode": "windows-gcc-x86" | ||
} | ||
], | ||
"version": 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "g++.exe - Launch program", | ||
"type": "cppdbg", | ||
"request": "launch", | ||
"program": "${workspaceFolder}\\Debug\\output.exe", | ||
"args": [], | ||
"stopAtEntry": true, | ||
"cwd": "${workspaceFolder}", | ||
"environment": [], | ||
"externalConsole": false, | ||
"MIMode": "gdb", | ||
"miDebuggerPath": "C:\\MinGW\\bin\\gdb.exe", | ||
"setupCommands": [ | ||
{ | ||
"description": "Enable pretty-printing for gdb", | ||
"text": "-enable-pretty-printing", | ||
"ignoreFailures": true | ||
} | ||
], | ||
"preLaunchTask": "g++.exe - Launch program" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"files.associations": { | ||
"lwjson.h": "c" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"type": "cppbuild", | ||
"label": "Build project", | ||
"command": "C:\\MinGW\\bin\\gcc.exe", | ||
"args": [ | ||
"-g", | ||
"${workspaceFolder}\\lwjson\\src\\lwjson\\*.c", | ||
"${workspaceFolder}\\dev\\VisualStudio\\main.c", | ||
"${workspaceFolder}\\test\\*.c", | ||
"-I${workspaceFolder}\\dev\\VisualStudio\\", | ||
"-I${workspaceFolder}\\lwjson\\src\\include\\", | ||
"-o", | ||
"${workspaceFolder}\\Debug\\output.exe" | ||
], | ||
"options": { | ||
"cwd": "${workspaceFolder}" | ||
}, | ||
"problemMatcher": [ | ||
"$gcc" | ||
], | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
} | ||
}, | ||
{ | ||
"type": "shell", | ||
"label": "Run built code", | ||
"command": "${workspaceFolder}\\Debug\\output.exe", | ||
"problemMatcher": [], | ||
"dependsOn": [ | ||
"Build project" | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ | |
* This file is part of LwJSON - Lightweight JSON format parser. | ||
* | ||
* Author: Tilen MAJERLE <[email protected]> | ||
* Version: v1.3.0 | ||
* Version: v1.4.0 | ||
*/ | ||
#ifndef LWJSON_HDR_OPTS_H | ||
#define LWJSON_HDR_OPTS_H | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ | |
* This file is part of LwJSON - Lightweight JSON format parser. | ||
* | ||
* Author: Tilen MAJERLE <[email protected]> | ||
* Version: v1.3.0 | ||
* Version: v1.4.0 | ||
*/ | ||
#ifndef LWJSON_HDR_H | ||
#define LWJSON_HDR_H | ||
|
@@ -103,9 +103,10 @@ typedef struct lwjson_token { | |
*/ | ||
typedef enum { | ||
lwjsonOK = 0x00, /*!< Function returns successfully */ | ||
lwjsonERR, | ||
lwjsonERR, /*!< Generic error message */ | ||
lwjsonERRJSON, /*!< Error JSON format */ | ||
lwjsonERRMEM, /*!< Memory error */ | ||
lwjsonERRPAR, /*!< Parameter error */ | ||
} lwjsonr_t; | ||
|
||
/** | ||
|
@@ -122,6 +123,7 @@ typedef struct { | |
} lwjson_t; | ||
|
||
lwjsonr_t lwjson_init(lwjson_t* lw, lwjson_token_t* tokens, size_t tokens_len); | ||
lwjsonr_t lwjson_parse_ex(lwjson_t* lw, const void* json_data, size_t len); | ||
lwjsonr_t lwjson_parse(lwjson_t* lw, const char* json_str); | ||
const lwjson_token_t* lwjson_find(lwjson_t* lw, const char* path); | ||
const lwjson_token_t* lwjson_find_ex(lwjson_t* lw, const lwjson_token_t* token, const char* path); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ | |
* This file is part of LwJSON - Lightweight JSON format parser. | ||
* | ||
* Author: Tilen MAJERLE <[email protected]> | ||
* Version: v1.3.0 | ||
* Version: v1.4.0 | ||
*/ | ||
#ifndef LWJSON_HDR_OPT_H | ||
#define LWJSON_HDR_OPT_H | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ | |
* This file is part of LwJSON - Lightweight JSON format parser. | ||
* | ||
* Author: Tilen MAJERLE <[email protected]> | ||
* Version: v1.3.0 | ||
* Version: v1.4.0 | ||
*/ | ||
#ifndef LWJSON_HDR_OPTS_H | ||
#define LWJSON_HDR_OPTS_H | ||
|
Oops, something went wrong.