-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathjson.agc
More file actions
24 lines (21 loc) · 514 Bytes
/
json.agc
File metadata and controls
24 lines (21 loc) · 514 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Project: AppGameKit-VoxelEngine
// File: json.agc
// Created: 20-08-15
/*
* Load a JSON file
*/
function Voxel_JSON_Load(filename$)
JSON$ as string = ""
memBlock as integer
memBlock = CreateMemblockFromFile(filename$)
JSON$ = GetMemblockString(Memblock, 0, GetMemblockSize(memBlock))
DeleteMemblock(memBlock)
endfunction JSON$
/*
* Save a string into a JSON file
*/
function Voxel_JSON_Save(string$, filename$)
OpenToWrite(1,filename$,0)
WriteString(1,string$)
CloseFile(1)
endfunction