miva_json_decode not recognized as a function

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MLT
    Mini Mivite


    • Jul 2007
    • 97

    #1

    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?
  • wmgilligan
    Developer Partner




    • Feb 2006
    • 742

    #2
    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

    • Scot - ScotsScripts.com
      Mivite








      • Apr 2006
      • 461

      #3
      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

      • dcarver
        Director of Software Dev.




        • May 2013
        • 400

        #4
        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

        • MLT
          Mini Mivite


          • Jul 2007
          • 97

          #5
          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

          • dcarver
            Director of Software Dev.




            • May 2013
            • 400

            #6
            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

            • MLT
              Mini Mivite


              • Jul 2007
              • 97

              #7
              Yes I use MakeSessionId() frequently.

              Comment

              • dcarver
                Director of Software Dev.




                • May 2013
                • 400

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

                Comment

                • MLT
                  Mini Mivite


                  • Jul 2007
                  • 97

                  #9
                  It is set to c:\MivaMia\BUILTINS

                  Comment

                  • dcarver
                    Director of Software Dev.




                    • May 2013
                    • 400

                    #10
                    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

                    • MLT
                      Mini Mivite


                      • Jul 2007
                      • 97

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

                      Comment

                      • dcarver
                        Director of Software Dev.




                        • May 2013
                        • 400

                        #12
                        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

                        • MLT
                          Mini Mivite


                          • Jul 2007
                          • 97

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

                          Comment

                          • MLT
                            Mini Mivite


                            • Jul 2007
                            • 97

                            #14
                            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

                            • MLT
                              Mini Mivite


                              • Jul 2007
                              • 97

                              #15
                              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