JSONIsFileValid

From GECK
Jump to: navigation, search


A function added by the SUP NVSE Plugin.

Description

Returns if JSON file is valid.

Syntax

[help]
(result:int) JSONIsFileValid FilePath:string

Example

JSONIsFileValid "aaMyJSON.json"

Can return multiple values

-6	When you tried to open other file with extenstion other than ".json"
-5	When you tried to access directory outside of game folder
-4	File can't be opened or doesn't exist
-3	JSON file is not structured(not valid)
 1	File is valid.

Notes

  • More info and other JSON functions can be found in this article