darinwilson / moran Goto Github PK
View Code? Open in Web Editor NEWSimple JSON parsing and generation for RubyMotion Android
License: MIT License
Simple JSON parsing and generation for RubyMotion Android
License: MIT License
rubymotion 3.14
E/cn/qxtf/hyys( 2780): Exception raised: NoMethodError: undefined method lstrip' for #<org.json.JSONObject:0x8890001d> E/cn/qxtf/hyys( 2780): from moran.rb:9 in
parse'
some how Moran got this source:
#<[B:0xcbb00085>
may be a DB issue.
I/com/v/app( 1878): #<[B:0xfbd00081>
E/com/v/app( 1878): Java exception raised: com.fasterxml.jackson.core.JsonParseException: Unexpected character ('#' (code 35)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
E/com/v/app( 1878): at [Source: #<[B:0xcbb00085>; line: 1, column: 2]
well actually.. I’ve changed my mind. I don’t think it’s a Moran issue. Because if you look at the error (and through testing) the “source” it tries to parse is "#<[B:0xcbb00085>” … clearly not Moran’s fault. Some weird exception in SwissDB was causing this but the app seemed to have stabilized. I think it was clunky ART error boil down. If it comes back I will open the issue if it makes sense… Really don’t think it was a bug in Moran though at this point.
It's not being maintained, and functionality is probably covered by Flow.
Per this post from @nickyhajal:
Unfortunately today I'm finding that for some requests the conversion of nested JSONObjects -> Ruby hash can take a long time... Up to 30 seconds.
I'm thinking maybe I'll just have to suck it up and use the JSONObject API, though I wonder if there could be a baked in translation of JSONObject at some point in RM.
I'm receiving a jsonObject which I am parsing with hash = Hash.from_json_object(json)
this returns
{id=1, media=[{id=1, url=some_url}, {id=2, url=some_url}]}
I'm trying to get an array of url's like this, urls = hash['media'].map(&:url)
, this in IRB works perfectly. But in Rubymotion is failing.
Moran.parse("[1,2,3]")
Results in:
Java exception raised: com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of com.rubymotion.Hash out of START_ARRAY token
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.