1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-06-30 22:17:13 +02:00

Minor updates to the JSON module.

This commit is contained in:
Sandu Liviu Catalin
2016-06-20 18:53:09 +03:00
parent 20ae4e602e
commit 22fc6c54c2
5 changed files with 178 additions and 5 deletions

View File

@ -41,6 +41,49 @@ void SqThrowLast(HSQUIRRELVM vm, CSStr msg)
// Throw the resulting error message
STHROWF("%s [%s]", msg, val.mPtr);
}
// ------------------------------------------------------------------------------------------------
Object SqFromJSON(HSQUIRRELVM vm, json_t * jval)
{
switch (json_typeof(jval))
{
case JSON_OBJECT:
{
} break;
case JSON_ARRAY:
{
} break;
case JSON_STRING:
{
} break;
case JSON_INTEGER:
{
} break;
case JSON_REAL:
{
} break;
case JSON_TRUE:
{
} break;
case JSON_FALSE:
{
} break;
case JSON_NULL:
{
} break;
default: STHROWF("Unknown JSON value type");
}
return Object();
}
// ------------------------------------------------------------------------------------------------
json_t * SqToJSON(HSQUIRRELVM vm, SQInteger idx)