Announcement

Collapse
No announcement yet.

JSON Query

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

  • [PLUGIN] JSON Query

    Hey guys!

    For the past couple of nights, while plowing through the codebase, I've been working on a plugin that allows you to communicate with servers through JSON with pure Blueprint nodes! Since I figured it could be helpful to at least some of you, I'm sharing the complete package!

    - Post to any URL
    - Get JSON data from any URL or string
    - Create your own custom post data with the Create JSON Data node
    - Get and set object/string (array) values in the post data, by key



    Example use


    And the resulting output post data from the example:


    Download link *UPDATED 5/12/2015*:
    http://www.stefander.nl/files/JSONQuery_UE4.7.6.zip(133KB)

    Installation
    Unzip the archive to the Engine/Plugins folder and enable the plugin in the Plugins window in the editor

    Changelist 5/12
    - Added an event broadcaster for when the request fails for any reason (cheers Kheka!)

    Changelist 5/11
    - Compiled with UE4.7.6
    - Added header Content Type "application/json" for mobile/Android support (thanks Zakkar!)
    - Added node for getting all keys from the data (thanks johnbo!)
    - Added a "From String" node, so you can load JSON data from a string, instead of being forced to use URLs (cheers conneich!)

    Changelist 3/25
    - Updated the plugin to UE4.7.3
    - Changed the version number to 0.8
    - Built the plugin with the correct version info so it will actually boot from the launcher build (thanks again Patrik2991! )

    Changelist 3/11
    - Updated the plugin to UE4.7.2

    Changelist 12/14
    - Updated the plugin to the 4.6 release branch

    Changelist 11/23
    - Updated the plugin to UE4.6
    - Updated the plugin version to 0.7
    - Changed the plugin type from Developer to Runtime so it will also run in packaged games
    - Added array support for both string and field data
    - Refactored some of the code
    - Created a proper icon for the plugin
    - Made most of the functions pure, so it doesn't require as many intermediate variables

    Changelist 11/11
    - Updated plugin to UE4.5 (sorry for the delay!)

    Changelist 9/8
    - Updated plugin to UE4.4

    Changelist 8/2
    - Updated plugin to UE4.3

    Changelist 7/5
    - Fixed a bug by prefixing the input URL with http:// when needed (it crashed the editor)
    - Fixed crash when trying to load a URL with invalid JSON data

    *NOTE: If you can't see the JSON category or nodes, be sure to turn off "Context Sensitive"

    If you guys have any comments, feature requests or improvements, please don't hesitate to ask.
    Lastly, I just want to give a shoutout to Rama for being a big help with his tutorials, if you're reading this, cheers buddy, you're awesome!
    Attached Files
    Last edited by eXi; 05-23-2015, 05:09 PM. Reason: Updated to latest version
    Stefan Wijnker | Senior Game Engineer at Little Chicken Game Company | Stefander.nl
    Happy Happy Joy Joy!
    JSON Query - Interior Mapping - Looping Louie

  • #2
    Seems like a great plugin! While I don't have any use for it now, I definitely see potential for the future.
    Programmer, Rigger, Animator - Demo Reel 2015 - My RnD / WIP thread - www.dennylindberg.com
    Worked on: Kitten'd - Guardians of Valor (Android, iOS)

    Comment


    • #3
      Oh yeah. That's fantastic. I am so happy with the UE4 community being so generous with their code. This is exactly what I needed to prove a concept Cheers!

      Comment


      • #4
        I can definitely see use for this, well done Stefan! netjes

        Comment


        • #5
          Correctly I'm doing? - http://i.imgur.com/Pg1d9Yl.png
          It return - void

          Comment


          • #6
            Denny: Cheers, thanks for the reply!

            Tom: Cheers bro, your support is greatly appreciated, let me know if you need any help!

            iMuse: Thanks man, graag gedaan!

            ga2mer: Actually, you almost got it! You need to assign the return post data value to a variable and then bind to the event, the Get Data By Key node doesn't do anything until you fill it with data So basically you're missing a few nodes, in order to request on button press, you'll have set it up like this (without any validation):

            Click image for larger version

Name:	JSONButtonPress.jpg
Views:	1
Size:	257.9 KB
ID:	1050870

            Sorry for the confusion, let me know if that helps, I'll add this example to my first post as well!
            Last edited by Stefander; 05-26-2014, 04:55 PM.
            Stefan Wijnker | Senior Game Engineer at Little Chicken Game Company | Stefander.nl
            Happy Happy Joy Joy!
            JSON Query - Interior Mapping - Looping Louie

            Comment


            • #7
              very sweet plugin! I really can't wait for the marketplace and many of these little plugins are incorporated.

              Its one of those things i would much prefer to prototype in blueprints and then go back and rewrite important things in C++. But even something like this, assuming its not time critical/looping multiple times i wouldn't even rewrite it! (say for just pulling update news or something like that).
              Twitter - @TheKRushin

              Feel free to ask questions and come learn to be an #UnrealDev

              How to report a Bug

              Comment


              • #8
                Great job!

                One note though - You shouldn't need the Intermediate directory in your rar. By including the source those libraries and such are generated when building your plugin into a given project.

                Bravo!
                About Me | JavaScript and UE4 | Exodus | Code Notes

                Comment


                • #9
                  KRushin: Cheers man, if you stumble across any issues be sure to let me know! At my current company we mainly use JSON to communicate with our servers, so I figured it'd make sense to start my Unreal 4 journey with this little plugin!

                  Bob: Thanks for the feedback man, I've removed the folder.. Should I add the plugin to the Wiki as well so it's a little more visible to the new users? Not sure what the policy is on that

                  I'm planning to integrate nested keys as well in a few days, as well as XML support, to make it a little more flexible!
                  Stefan Wijnker | Senior Game Engineer at Little Chicken Game Company | Stefander.nl
                  Happy Happy Joy Joy!
                  JSON Query - Interior Mapping - Looping Louie

                  Comment


                  • #10
                    Please do. The wiki is open to all contributions, but you should be willing to allow others to modify it =)

                    Keep up the good work!
                    About Me | JavaScript and UE4 | Exodus | Code Notes

                    Comment


                    • #11
                      wow all these cool plugins around the forum... saving me a lot of work thanks Stefander

                      Comment


                      • #12
                        Bob: No worries, I'd love that! I'll put it up later today, cheers!

                        Xces: Glad you like it, it's my very first contribution!

                        I'm very grateful for all these kind comments, thanks everyone, I'll be releasing more stuff soon!
                        Stefan Wijnker | Senior Game Engineer at Little Chicken Game Company | Stefander.nl
                        Happy Happy Joy Joy!
                        JSON Query - Interior Mapping - Looping Louie

                        Comment


                        • #13
                          one quick question: does it works with JSONArrays ? if yes how ?

                          Comment


                          • #14
                            And how safe is it against hacking?

                            Comment


                            • #15
                              Will we see this updated for 4.2.1? It says it's not compatible?

                              Comment

                              Working...
                              X