Run this code and it will create a file;
C:\Users\
your_id\AppData\Local\AGKApps\
your_app\media\student.json
Use that file as a guide for creating your json file
SetErrorMode(2)
// set window properties
SetWindowTitle( "his_json" )
SetWindowSize( 1024, 768, 0 )
SetWindowAllowResize( 1 ) // allow the user to resize the window
// set display properties
SetVirtualResolution( 1024, 768 ) // doesn't have to match the window
SetOrientationAllowed( 1, 1, 1, 1 ) // allow both portrait and landscape on mobile devices
SetSyncRate( 30, 0 ) // 30fps instead of 60 to save battery
SetScissor( 0,0,0,0 ) // use the maximum available screen space, no black borders
UseNewDefaultFonts( 1 )
type sibling_ids
id as integer
endtype
type StudentInfo
id as integer
serial_number as integer
custom_id as String
applicant_id as string
email as string
first_name as String
last_name as String
name as String
other_name as String
preferred_name as String
birth_date as String
gender as String
enrollment_year as integer
full_address as String
address as String
address_ii as String
city as String
State as String
postal_code as String
country as String
grade as String
campus as String
tags as String
status as String
status_level as String
status_changed_at as String
managebac_student_id as string
applied_id as String
enrolled_at as String
inquired_at as String
sibling_ids as sibling_ids[]
nationality as string
student_id as String
passport_id as String
endtype
type student
id as integer
info as StudentInfo[]
endtype
info as StudentInfo
st as student
stu as student[]
st.id = 0
st.info.insert(info)
stu.insert(st)
stu.save("student.json")
do
Print( ScreenFPS() )
Sync()
loop
***EDIT***
I changed the code to add a couple of entries to show how the array is formatted so
This code
SetErrorMode(2)
// set window properties
SetWindowTitle( "his_json" )
SetWindowSize( 1024, 768, 0 )
SetWindowAllowResize( 1 ) // allow the user to resize the window
// set display properties
SetVirtualResolution( 1024, 768 ) // doesn't have to match the window
SetOrientationAllowed( 1, 1, 1, 1 ) // allow both portrait and landscape on mobile devices
SetSyncRate( 30, 0 ) // 30fps instead of 60 to save battery
SetScissor( 0,0,0,0 ) // use the maximum available screen space, no black borders
UseNewDefaultFonts( 1 )
type sibling_ids
id as integer
endtype
type StudentInfo
id as integer
serial_number as integer
custom_id as String
applicant_id as string
email as string
first_name as String
last_name as String
name as String
other_name as String
preferred_name as String
birth_date as String
gender as String
enrollment_year as integer
full_address as String
address as String
address_ii as String
city as String
State as String
postal_code as String
country as String
grade as String
campus as String
tags as String
status as String
status_level as String
status_changed_at as String
managebac_student_id as string
applied_id as String
enrolled_at as String
inquired_at as String
sibling_ids as sibling_ids[]
nationality as string
student_id as String
passport_id as String
endtype
type student
id as integer
info as StudentInfo[]
endtype
info as StudentInfo
st as student
stu as student[]
st.id = 0
st.info.insert(info)
st.info.insert(info)
stu.insert(st)
st.id = 1
stu.insert(st)
stu.save("student.json")
do
Print( ScreenFPS() )
Sync()
loop
Produces this JSON file
[
{
"id": 0,
"info": [
{
"id": 0,
"serial_number": 0,
"custom_id": "",
"applicant_id": "",
"email": "",
"first_name": "",
"last_name": "",
"name": "",
"other_name": "",
"preferred_name": "",
"birth_date": "",
"gender": "",
"enrollment_year": 0,
"full_address": "",
"address": "",
"address_ii": "",
"city": "",
"state": "",
"postal_code": "",
"country": "",
"grade": "",
"campus": "",
"tags": "",
"status": "",
"status_level": "",
"status_changed_at": "",
"managebac_student_id": "",
"applied_id": "",
"enrolled_at": "",
"inquired_at": "",
"sibling_ids": [
],
"nationality": "",
"student_id": "",
"passport_id": ""
},
{
"id": 0,
"serial_number": 0,
"custom_id": "",
"applicant_id": "",
"email": "",
"first_name": "",
"last_name": "",
"name": "",
"other_name": "",
"preferred_name": "",
"birth_date": "",
"gender": "",
"enrollment_year": 0,
"full_address": "",
"address": "",
"address_ii": "",
"city": "",
"state": "",
"postal_code": "",
"country": "",
"grade": "",
"campus": "",
"tags": "",
"status": "",
"status_level": "",
"status_changed_at": "",
"managebac_student_id": "",
"applied_id": "",
"enrolled_at": "",
"inquired_at": "",
"sibling_ids": [
],
"nationality": "",
"student_id": "",
"passport_id": ""
}
]
},
{
"id": 1,
"info": [
{
"id": 0,
"serial_number": 0,
"custom_id": "",
"applicant_id": "",
"email": "",
"first_name": "",
"last_name": "",
"name": "",
"other_name": "",
"preferred_name": "",
"birth_date": "",
"gender": "",
"enrollment_year": 0,
"full_address": "",
"address": "",
"address_ii": "",
"city": "",
"state": "",
"postal_code": "",
"country": "",
"grade": "",
"campus": "",
"tags": "",
"status": "",
"status_level": "",
"status_changed_at": "",
"managebac_student_id": "",
"applied_id": "",
"enrolled_at": "",
"inquired_at": "",
"sibling_ids": [
],
"nationality": "",
"student_id": "",
"passport_id": ""
},
{
"id": 0,
"serial_number": 0,
"custom_id": "",
"applicant_id": "",
"email": "",
"first_name": "",
"last_name": "",
"name": "",
"other_name": "",
"preferred_name": "",
"birth_date": "",
"gender": "",
"enrollment_year": 0,
"full_address": "",
"address": "",
"address_ii": "",
"city": "",
"state": "",
"postal_code": "",
"country": "",
"grade": "",
"campus": "",
"tags": "",
"status": "",
"status_level": "",
"status_changed_at": "",
"managebac_student_id": "",
"applied_id": "",
"enrolled_at": "",
"inquired_at": "",
"sibling_ids": [
],
"nationality": "",
"student_id": "",
"passport_id": ""
}
]
}
]