Skip to content

Commit

Permalink
[lua] Respect lua-vanilla for Json.parse (#10915)
Browse files Browse the repository at this point in the history
* Update JsonParser.hx

Respect lua-vanilla for Json.parse

* fix typo
  • Loading branch information
inklit authored Jan 3, 2023
1 parent f97065a commit b4cf007
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions std/lua/_std/haxe/format/JsonParser.hx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ class JsonParser {
If `str` is null, the result is unspecified.
**/
static public inline function parse(str:String):Dynamic {
#if lua_vanilla
return new JsonParser(str).doParse();
#else
return lua.lib.hxluasimdjson.Json.parse(str);
#end
}

var str:String;
Expand Down

0 comments on commit b4cf007

Please sign in to comment.