These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
12Next page
 

EVE REST API payload change request.

First post
Author
Miilla
Hulkageddon Orphanage
#1 - 2012-04-21 14:02:54 UTC  |  Edited by: Miilla
Can we have a JSON payload aswell as XML to make it easier for developing Android apps that prefer JSON as they only have basic SAX library (XPATH is also buggy across API levels) and JSON is pretty much free and the preferred droid format for web services :) And NO I don't want to have to manage external libraries to do this, I want to use standard droid and java namespaces.

Can we specify the payload response format as a parameter please?
Sentient Blade
Crisis Atmosphere
Coalition of the Unfortunate
#2 - 2012-04-21 14:17:19 UTC
JSON output would be very nice. Personally I think XML is a pain.
Miilla
Hulkageddon Orphanage
#3 - 2012-04-21 14:18:19 UTC
Sentient Blade wrote:
JSON output would be very nice. Personally I think XML is a pain.


I have no problem with XML as a format, the issue is that Android prefers JSON and has better support on it than XML. Not to mention across API levels on droid XML has issues on parsing.

I prefer to build a house using bricks supplied, not having to make the bricks too :)
Simetraz
State War Academy
Caldari State
#4 - 2012-04-21 14:23:33 UTC
Cause XML is a open standard and JSON is a JAVA standard.

Why would you want to be dependent on JAVA a third party who is known for poor memory control and and lots of holes in there code.





Miilla
Hulkageddon Orphanage
#5 - 2012-04-21 14:26:17 UTC  |  Edited by: Miilla
Simetraz wrote:
Cause XML is a open standard and JSON is a JAVA standard.

Why would you want to be dependent on JAVA a third party who is known for poor memory control and and lots of holes in there code.








This isnt a thread about what is better or not, this is a thead for IF YOU WANT ANDROID EVE APPS, then make them use native protocols, JSON is native to droid so we can bring apps to you faster. I am asking for a parameter we can set so we can get JSON and you can still keep your default XML without it.

If you want me on board for droid apps, talk JSON because I don't want to reinvent the wheel that already exists (XML parsing in SAX which as i previously stated is inconsistent across droid API levels). I don't want to take dependencies on external libraries and hope to get redistribution licenses in order to sell my app on the market and have to depend on them for fixes rather than the stock API levels.

The point is to make developing for the API easier rather than harder. Ship dual payload formats, it isn't that hard, WCF services will pump out both formats using the ServiceModel attribute for the ResponseFormat for their webservice. And since CCP are an ASP house I am pretty sure they are using WCF as their webservice stack.
Simetraz
State War Academy
Caldari State
#6 - 2012-04-21 14:35:09 UTC  |  Edited by: Simetraz
Scratch what I said there is a EVE technology Forum section.

That is where this belongs
Miilla
Hulkageddon Orphanage
#7 - 2012-04-21 14:39:31 UTC  |  Edited by: Miilla
Put it this way, when they charge for API access, count me out if they don't talk my language. In droid's case its JSON and REST, so far they only got 50% right. Windows Phone is a no runner for app development for me because it is locked down tighter than a bunnies bottom and iOS I havn't looked at yet but currently talking droid right now for its openness and ease of development ( I also talk over bluetooth etc which WP cannot do), and am considering integrating with bluetooth devices for some "agumented" apps (audio augomentation and perhaps visual augmentation when certain devices come to market).
Miilla
Hulkageddon Orphanage
#8 - 2012-04-21 14:40:28 UTC
Simetraz wrote:
Scratch what I said there is a EVE technology Forum section.

That is where this belongs


They are welcome to move it to that section but I live in General forum, don't care where they put it as long as they read it and consider it.
Sentient Blade
Crisis Atmosphere
Coalition of the Unfortunate
#9 - 2012-04-21 14:46:23 UTC
I'm an enterprise level software developer and for me at least XML is a ballache at the best of times; node processing, in particular text nodes, is convoluted and lacks any semblance of elegance due to the extras that were added on top of it.

JSON by comparison is lighter, has a tighter binding to internal memory representation and is just generally better. I think it's now pretty much the defacto standard for AJAX which is a good thing.

First thing I do with the EvE online API is convert it to a more JSON relatable representation.
Miilla
Hulkageddon Orphanage
#10 - 2012-04-21 14:48:12 UTC  |  Edited by: Miilla
Sentient Blade wrote:
I'm an enterprise level software developer and for me at least XML is a ballache at the best of times; node processing, in particular text nodes, is convoluted and lacks any semblance of elegance due to the extras that were added on top of it.

JSON by comparison is lighter, has a tighter binding to internal memory representation and is just generally better. I think it's now pretty much the defacto standard for AJAX which is a good thing.

First thing I do with the EvE online API is convert it to a more JSON relatable representation.


Well with XML you can autovalidate against a Schema (JSON also has a draft spec on this for the future for schema autovalidation so no big difference here), XPATH and XDOM's and Linq for XML makes it easy but just is pretty much out for Anadroid.

I really want to build these "augmented" apps, not your plain bog standard boring form display apps. I am targeting ahead in the future for various wearables and that also means Bluetooth mostly which is only pretty much accessible on Droid (and probably iOS - havn't looked at their API yet), but I need droid for now.

I don't want to turn this thread into XML vs JSON and which is better or not, I just want native support for Android to make building stuff easier so I can focus more on the app and less on being a plumber.

Dual payloads to support both worlds, it is possible to do, just please do it :)

This way you can pick and choose and everybody is happy.


Simply change ResponseFormat in the ServiceContract method to allow JSON when it is supplied as a parameter in the call, the backend ADO/Linq queries stay the same, the payload format is handled by WCF automatically, no big major changes needed, just support the parameter.
Miilla
Hulkageddon Orphanage
#11 - 2012-04-21 16:25:03 UTC  |  Edited by: Miilla
Fly me up to Iceland ill fix it for you :P
ISD Grossvogel
ISD Community Communications Liaisons
ISD Alliance
#12 - 2012-04-21 17:02:11 UTC
Thread moved from General Discussion.

ISD Grossvogel (ISD Гроссфогель) Captain, Community Communication Liaisons (CCL) Волонтёр группы по взаимодействию с игроками Interstellar Services Department

Desmont McCallock
#13 - 2012-04-21 17:22:19 UTC
AFAIK EVE Devs said something about CREST and SDE dumps being in YAML in the future. I could be wrong though cause that FF DevTrack video was hard to watch.
Miilla
Hulkageddon Orphanage
#14 - 2012-04-21 17:30:17 UTC  |  Edited by: Miilla
Desmont McCallock wrote:
AFAIK EVE Devs said something about CREST and SDE dumps being in YAML in the future. I could be wrong though cause that FF DevTrack video was hard to watch.


.

If they want driod apps, talk driod. that means REST and JSON, unless CCP want to ship a library we can redistribute and charge money for apps built on it, unless they do that, they can kiss ANdroid apps bye bye.

I really don't care what they use as long as I can talk it and charge for my app without licensing issues with libraries. I am here to build apps, not plumbing. I am not going to do CCP's work for them by building THEIR API for them or their support libraries.

There is absolutely no reason they cannot have multiple payload formats.
ISD Eshtir
ISD Community Communications Liaisons
ISD Alliance
#15 - 2012-04-21 18:02:42 UTC
Thread cleaned, be nice and stay on topic!

ISD Eshtir

Captain

Community Communication Liaisons

Interstellar Services Department

Miilla
Hulkageddon Orphanage
#16 - 2012-04-21 18:05:33 UTC  |  Edited by: Miilla
http://wiki.eveonline.com/en/wiki/CREST_Documentation

Seems they WILL be supporting JSON in future.

"Representations are formatted as JSON objects containing name/value pairs and nested objects and arrays. Some name/value pairs are optional, meaning that they may be omitted by senders when not applicable. Some name/value pairs have default values which will be used when a value is not provided. "

Problem solved. You can close the thread now :)


Why must they add to confusion by renaming the REST terminology to CREST? Carbon REST, just call it REST ffs. Now, what is SDE? YAML seems yet another payload format, if android has no libraries for parsing YAML, you can forget that too. I can only see JSON libraries and SAX (which is pretty crap).

They can supply libraries we can redist for free without license issues in paid apps or they can support built in platform libraries in their API or its a no go in my world.
Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#17 - 2012-04-21 21:41:52 UTC
Simetraz wrote:
Cause XML is a open standard and JSON is a JAVA standard.

Why would you want to be dependent on JAVA a third party who is known for poor memory control and and lots of holes in there code.





Just as a minor note, JSON is /Javascript/ not Java. JavaScript Object Notation.

They're not significantly related.


http://en.wikipedia.org/wiki/ECMAScript

It's a reasonable format. XML has advantages for error detection, as you can have everything defined in a DTD or XSD, allowing for off the shelf parsing. Also allows for XSLT for direct display. But JSON is /simple/. And these days, most languages have a built in parser. Including Javascript (only an idiot evals JSON)

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#18 - 2012-04-21 21:45:20 UTC
Miilla wrote:
Now, what is SDE?


Static Data Extract

It's the database dump that gets updated every major release (then converted by people into alternate formats)



As for YAML:
SnakeYaml

http://stackoverflow.com/questions/4054083/is-there-a-good-yaml-library-for-android

total of 5 seconds of search on google.

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

Dragonaire
Here there be Dragons
#19 - 2012-04-22 03:15:12 UTC
You might also try looking at some of the other ways to parser XML as SAX just sucks IMHO Blink
http://www.ibm.com/developerworks/opensource/library/x-android/
It has a section or two on the pull parser which is much easier to work with and is similar to XMLReader from PHP it looks like.

Finds camping stations from the inside much easier. Designer of Yapeal for the Eve API. Check out the Yapeal PHP API Library thread.

mxzf
Shovel Bros
#20 - 2012-04-22 03:31:35 UTC
Yeah, +1 for JSON API info. I write most of my code in Python and JSON is amazingly simple to use while XML is amazingly complicated. I would love to be able to do stuff in JSON instead of XML.
12Next page