« first day (1378 days earlier)      last day (3567 days later) » 
01:00 - 19:0019:00 - 21:00

7:00 PM
Good idea
 
foreach not applicable to expression type
 
Maybe try for (final Map.Entry<String, Object> entry : (HashMap<String, Object>) json)
 
Error:(57, 80) inconvertible types
found : org.json.JSONObject
required: java.util.HashMap<java.lang.String,java.lang.Object>
 
Hold on.
 
i won't move
 
7:02 PM
Yes, hold your breath as well, while I get my IDE to work.
 
thanks
 
It's not very happy about me having it on for 14 hours straight.
 
slacker
I can provide the actual json string
i.imgur.com/zDYZGeQ.png pastebin.com/EQJG90kr but I'm sending only the Resource object to my method
 
ah... it's for (final Object entry : json.entrySet())... no idea why I misused that
my code is:
 static Object findKeyFromMultidimensionalThing(final JSONObject json, final String key) {
    for (final Entry<String, Object> entry : ((HashMap<String, Object>) json).entrySet()) {
        if (entry instanceof JSONObject) {
            final Object deepentry = HashMapTest.findKeyFromMultidimensionalThing((JSONObject) entry, key);
            if (deepentry != null) return deepentry;
        }
        if (entry.getKey().equals(key)) return entry.getValue();
    }
    return null;
}
Though that's for org.json.simple.JSONObject.
 
ah, maybe that's the reason
I should've mentioned that I working with import org.json.JSONObject;
because it's still not ok here
 
7:13 PM
oh
 
doc, is it bad?
i'm trying to create an app as an exercise
 
I don't know.
 
from an API I've already developed
does that work on your comp?
 
Yeah, I'm getting org.json package now.
 
with your latest code I get Error:(51, 20) cannot find symbol class Entry
 
7:36 PM
looks like something nasty, it's all the day I'm on it
 
 
1 hour later…
8:54 PM
Message in a bottle:
I'm looking for 2 more upvotes for the only Java project of the SO open source advertising program: http://meta.stackoverflow.com/questions/260377/open-source-advertising-sidebar-2h-2014/266558#266558 (Not sexy but useful lib for technical analysis)
Thank you! :]
 
01:00 - 19:0019:00 - 21:00

« first day (1378 days earlier)      last day (3567 days later) »