Reading JO4/NativeArray in HashMap
Jeramie Hicks
jeramiehicks at hotmail.com
Thu Oct 16 03:19:17 UTC 2014
I'm not sure if this is the right place to ask, as I'm fairly new to this whole scripting thing. But I've been banging my head against the wall for about 4 days and can't seem to make any progress.
Here's the really short version. I have a custom (extended) HashMap in Java. I put() it into the engine, eval the script, everything works great. When the script is done and I'm back in Java, my poor HashMap is now full of NativeArrays and JO4s. I gotta JSON-up all this data and I can't seem to find any way into those objects (and even if so, I don't want to depend on talking straight to internals). I really, really don't want to burden the script with any boilerplate to make this work; the script currently runs beautifully with nice clean statements like "dataStore.xyz = [5,6,7];" so I'd hate to junk it up with a bunch of manual function calls to just make this to work. I can see the data I need is RIGHT THERE in my HashMap... what step am I missing? Thanks.
More specific info at http://stackoverflow.com/questions/26392602/reading-nashorn-jo4-and-nativearray
Much obliged for your time. - Jeramie Hicks
More information about the nashorn-dev
mailing list