Reputation: 704
I'm developing an application (MIDlet) for the Gemalto EHS6 modem, which runs java micro edition. I want to make an HTTP post using the JSON format. What would be the easiest way to do this?
org.json
is not supported in J2ME
I've already read these answers, but I can't believe that would be the way to do it!? Depend on some 3rd party implementation? I could write a simply one myself only for the subset of the JSON format I need - But this does not seem like the "right" choice. Or what? Is that the most efficient way of doing it in the end?
Upvotes: 0
Views: 336
Reputation: 41510
Yes, there is an API for JSON in Java ME. You can see it in the section Oracle Java ME Embedded APIs, the package name for that is com.oracle.json
. It is available since the 8.0 release.
The main problem for you is that the modem you mentioned supports only Java ME 3.2 judging by its web page. Unless you know a way to upgrade it to the 8.0 release or higher, I'm afraid you're stuck with using your own libraries.
Upvotes: 1