New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange Recursive Behavior (Json_Map) #1252

Closed
HarryCordewener opened this Issue Oct 1, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@HarryCordewener
Contributor

HarryCordewener commented Oct 1, 2018

WARNING: This behavior changed in the more recent version and may be indicative of a bigger problem!!!

The following two JSON functions are from: help json_map3

&TEST me={"codex":{"name":"","type":"","share_ok":true,"public":true}}
&PRETTY_JSON me=u(me/pretty_json_sub,,%0,,0,strmatch(%0,\\{*))
&PRETTY_JSON_SUB me=repeat(%t,%3)[if(%4,json(string,%2):%b)][switch(%1,\{*,\{%r[json_map(%=,%1,\,%r,inc(%3),1)]%r[repeat(%t,%3)]\},\[*,\[%r[json_map(%=,%1,\,%r,inc(%3),0)]%r[repeat(%t,%3)]\],json(%0,%1))]

Expected behavior:

 {
 	"codex": {
 		"name": "",
 		"type": "",
 		"share_ok": true,
 		"public": true
 	}
 }

Actual behavior:

{
  "codex": {

  },
  "codex": {

  },
  "codex": {

  },
  "codex": {

  },

Ad Nauseum

shawnw added a commit to shawnw/pennmush that referenced this issue Oct 1, 2018

@shawnw shawnw closed this in 602c88d Oct 3, 2018

shawnw added a commit that referenced this issue Nov 14, 2018

shawnw added a commit that referenced this issue Nov 14, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment