mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 15:01:53 +08:00
10 lines
230 B
GDScript
10 lines
230 B
GDScript
|
|
class_name JsonTool
|
||
|
|
|
||
|
|
static func parseJson(filePath: String):
|
||
|
|
var file = FileAccess.open(filePath, FileAccess.READ)
|
||
|
|
var json = file.get_as_text()
|
||
|
|
file.close()
|
||
|
|
var jsonObj = JSON.new()
|
||
|
|
jsonObj.parse(json)
|
||
|
|
return jsonObj.data
|