I searched and could not find an answer. This has me kind of stuck. I am running miva mia 5.33 and compiler 5.33. I tried an older compiler just in case, to no avail. So calling miva_json_decode() is giving me a ' Function name 'miva_json_decode' not defined nor recognized as an external function.' Can anyone help me with this?
miva_json_decode not recognized as a function
Collapse
X
-
Hi.
I use this a lot.
<MvAssign name="l.ok" value="{ miva_json_decode(json_in, json_out) }">
I am running 5.33
William Gilligan - Orange Marmalade, Inc.
www.OrangeMarmaladeinc.com
-
I just tested compiling with miva_json_decode(...) in mivamia and it compiled fine. I'd say post the code you are using miva_json_decode(...) in so we can see if there's something else in the way.
Comment
-
Thank you for the responses. I am running windows 10. Simple code
</MvCALL>
<MvASSIGN NAME = "decoded" VALUE = "{ miva_json_decode(s.callvalue,arr_json) }">
In Mia the libraries window shows all versions in there 5.33
EDIT: MVC_LIB is pointed to c:\msc533\BUILTINS
Is that correct?
Comment
-
The Mia libraries don't correlate to the compiler / assembler. Those libraries are used by the Mia to execute compiled MVC files. Can you use any other builtins, such as MakeSessionID() or do you get an error stating that function does not exist either?David Carver
Miva, Inc. | Software Developer
Comment
-
I have run into a new issue! I got miva_json_decode working again thank you! Now i have run into an issue. It is working beautifully, then it seems i got a json response from our api that is 2 responses in one. When i tossed this into the json decoder I got no info. decode_last_error() gave me the reason and thats when i noticed there are 2 completely different Json sections. Im wondering if anyone has ever run into this before. We are using Squareup and just noticed this on a return from ccof. Im assuming there is no way the json_decoder will handle this. Just wondering if anyone had some experience or advice. Thanks!
Here is the return i get:
{ "card_nonce": "cnon:FAKENUMBERHERE",
"billing_address": {
"address_line_1": "333 Hammered ave",
"address_line_2": "Apt C",
"locality": "Grants Pass",
"administrative_distric_level_1": "OR",
"postal_code": "88888",
"country": "US"
},
"cardholder_name": "Ghandi" }
{"card":{
"id":"ccof:FAKENUMBERHERE",
"card_brand":"VISA",
"last_4":"1111",
"exp_month":2,
"exp_year":2023,
"cardholder_name":"Ghandi",
"billing_address":{
"address_line_1":"333 Hammered ave",
"address_line_2":"Apt C",
"locality":"Grants Pass",
"postal_code":"88888",
"country":"US"
}
}
}
Comment
Comment