Announcement

Collapse
No announcement yet.

miva_json_decode not recognized as a function

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • miva_json_decode not recognized as a function

    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?

  • 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

    Comment


    • 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.
      M.A.D.* since 1997

      http://www.scotsscripts.com

      *miva application developers

      Comment


      • What operating system are you using? I would imagine that your MVC_LIB environment variable is not pointing to the correct path of the 5.33 builtins.
        David Carver
        Miva, Inc. | Software Developer

        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?
          Last edited by MLT; 02-11-20, 09:52 AM. Reason: New info

          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


            • Yes I use MakeSessionId() frequently.

              Comment


              • What is your MVC_LIB environment path set to?
                David Carver
                Miva, Inc. | Software Developer

                Comment


                • It is set to c:\MivaMia\BUILTINS

                  Comment


                  • Does it compile if you do
                    Code:
                    mvc1 -b C:\MivaMia\BUILTINS\MVBSYSTEM.DLL -o test.mva <input_filepath>
                    David Carver
                    Miva, Inc. | Software Developer

                    Comment


                    • I get this error, mvc1: Unable to register .DLL/.so 'c:\MivaMia\Builtins\Mvbsystem.dll': l

                      Comment


                      • Are you sure you have installed the correct version of compiler for your system, i.e. 32-bit / 64-bit? I would try uninstalling the compiler and re-installing and see if that fixes the issue.
                        David Carver
                        Miva, Inc. | Software Developer

                        Comment


                        • Will do. Thank you very much for your assistance. I will let you know as soon as I am done.

                          Comment


                          • Thank you dcarver! I had an older version still on my machine. Uninstalled 5.33 , removed the older version, and reinstalled and all works well now. It just compiled. Appreciate the help!

                            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

                              Working...
                              X

                              This website uses cookies to identify visitors, track visitors to our website, store login session information and to remember your user preferences. By continuing to use this site you agree to our use of cookies. Learn More.

                              This website uses cookies. By continuing to use this site you agree to our use of cookies. Learn More.

                              Accept