Playmaker Forum
PlayMaker Feedback => Action Requests => Topic started by: ssk9208 on January 09, 2015, 04:36:20 AM
-
Hi,
Can anyone create an action that gets a Json object from a URL and stores the data it contains to strings?
-
Hi,
I have this planned, but the major problem with json is then accessing data in a convenient way because json libraries do not have the Xpath equivalent search system that is found with Xml, so accessing data is tricky with json within PlayMaker.
What I think would work well is to get the json and convert it into xml, which then is all accessed using XmlMaker. I already have a converted in place, but it's still very much a work in progress.
If you think it would be useful for you, let me know, and I can clean this up and start sharing it properly on the wiki.
Bye,
Jean
-
Thanks for the prompt reply!
It will be very useful for me, since I am building a license verification system in my site. I submit the url with the license key in it and the site will send a Json object with info about the license.
-
Hi,
ok, please bump every beginning of the week or so, I have too many things to do, so bumping is required at the present time :)
Bye,
Jean
-
bump 8)
-
Hi,
Thanks for bumping :)
It went quicker then expected, even tho it will depend on a third party json library ( newtonsoft, so it's solid, but I whish I could have just used .net).
Check this attached package. Let me know if it's ok ( there is an example in "PlayMaker DataMaker/json/examples" that takes a json string, parse it into xml, you can verify the content in the xml proxy.
Let me know how it goes.
A lost more can be done to just work with json, sometime it may be just enough, but as far as converting directly to xml, you are all set.
Bye,
Jean
-
Assets/PlayMaker DataMaker/Json/Actions/ConvertJsonStringToXmlNode.cs(16,51): error CS0246: The type or namespace name `DataMakerXmlNodeActions' could not be found. Are you missing a using directive or an assembly reference?
-
Hi,
You do need the XmlMaker to be installed as well.
also, quick note: if you have Photon for example, you will have a Newtonsoft.Json library as a duplicate, simply delete the duplicates in your projects to leave only one.
Bye,
Jean
-
How to install XmlMaker ... ????
-
Hi,
It's shipped under DataMaker (https://hutonggames.fogbugz.com/default.asp?W1133), sorry for the confusion :)
Bye,
Jean