Steps to reproduce
- With the API wikilambda_function_call run the following function
{ "Z1K1":"Z7", "Z7K1":"Z885", "Z885K1":"Z511" }
- E.g. Link to this call in beta cluster: https://wikifunctions.beta.wmflabs.org/w/api.php?action=wikilambda_function_call&format=json&wikilambda_function_call_zobject=%7B%22Z1K1%22%3A%22Z7%22%2C%22Z7K1%22%3A%22Z885%22%2C%22Z885K1%22%3A%22Z511%22%7D
Observed behavior
- The function call returns the following value:
{ "Z1K1": "Z4", "Z4K1": { "Z1K1": "Z7", "Z7K1": "Z885", "Z885K1": "Z511" }, "Z4K2": { "Z1K1": "Z7", "Z7K1": "Z803", "Z803K1": { "Z1K1": "Z39", "Z39K1": "Z50K1" }, "Z803K2": "Z511" }, "Z4K3": "Z101" }
While the returned zObject is correct, it lacks the key information as the value for Z4K2 has not been evaluated, so instead of having a type with the list of keys, we have just another function call to Z803. In this particular case, I believe the object should be evaluated a level further and instead of returning the object above, return the following:
{ "Z1K1": "Z4", "Z4K1": { "Z1K1": "Z7", "Z7K1": "Z885", "Z885K1": "Z511" }, "Z4K2": [ "Z3", { "Z1K1": "Z3", "Z3K1": "Z39", "Z3K2": "Z511K1", "Z3K3": { "Z1K1": "Z12", "Z12K1": [ "Z11", { "Z1K1": "Z11", "Z11K1": "Z1002", "Z11K2": "key" } ] } }, { "Z1K1": "Z3", "Z3K1": "Z99", "Z3K2": "Z511K2", "Z3K3": { "Z1K1": "Z12", "Z12K1": [ "Z11", { "Z1K1": "Z11", "Z11K1": "Z1002", "Z11K2": "object" } ] } } ], "Z4K3": "Z101" }