From ce6050cc0849dbcb6b7efd7e6968d58835aa5331 Mon Sep 17 00:00:00 2001 From: Sandu Liviu Catalin Date: Sat, 10 Jul 2021 14:15:41 +0300 Subject: [PATCH] JSMN approach. --- module/Library/JSON.cpp | 22 ++++++++++++++++++++++ module/Library/JSON.hpp | 17 +++++++++++++++++ module/Register.cpp | 2 ++ 3 files changed, 41 insertions(+) create mode 100644 module/Library/JSON.cpp create mode 100644 module/Library/JSON.hpp diff --git a/module/Library/JSON.cpp b/module/Library/JSON.cpp new file mode 100644 index 00000000..cdfca46c --- /dev/null +++ b/module/Library/JSON.cpp @@ -0,0 +1,22 @@ +// ------------------------------------------------------------------------------------------------ +#include "Library/JSON.hpp" + +// ------------------------------------------------------------------------------------------------ +#include + +// ------------------------------------------------------------------------------------------------ +#include + +// ------------------------------------------------------------------------------------------------ +namespace SqMod { + +// ------------------------------------------------------------------------------------------------ + + +// ================================================================================================ +void Register_JSON(HSQUIRRELVM vm) +{ + +} + +} // Namespace:: SqMod diff --git a/module/Library/JSON.hpp b/module/Library/JSON.hpp new file mode 100644 index 00000000..27f15da6 --- /dev/null +++ b/module/Library/JSON.hpp @@ -0,0 +1,17 @@ +#pragma once + +// ------------------------------------------------------------------------------------------------ +#include "Core/Utility.hpp" +#include "Library/IO/Buffer.hpp" + +// ------------------------------------------------------------------------------------------------ +#define JSMN_HEADER +#include + +// ------------------------------------------------------------------------------------------------ +namespace SqMod { + +// ------------------------------------------------------------------------------------------------ + + +} // Namespace:: SqMod diff --git a/module/Register.cpp b/module/Register.cpp index b14956e2..e2343827 100644 --- a/module/Register.cpp +++ b/module/Register.cpp @@ -35,6 +35,7 @@ extern void Register_Chrono(HSQUIRRELVM vm); extern void Register_CURL(HSQUIRRELVM vm); extern void Register_Format(HSQUIRRELVM vm); extern void Register_IO(HSQUIRRELVM vm); +extern void Register_JSON(HSQUIRRELVM vm); extern void Register_MMDB(HSQUIRRELVM vm); extern void Register_Numeric(HSQUIRRELVM vm); extern void Register_String(HSQUIRRELVM vm); @@ -99,6 +100,7 @@ bool RegisterAPI(HSQUIRRELVM vm) Register_CURL(vm); Register_Format(vm); Register_IO(vm); + Register_JSON(vm); Register_MMDB(vm); Register_Numeric(vm); Register_String(vm);