Sha256: 47df610a5394a71c603c39ba9c107684e1430325c2ef0f77690c23aa188a10d0

Contents?: true

Size: 1.09 KB

Versions: 9

Compression:

Stored size: 1.09 KB

Contents

package com.rho.sync;
import org.json.me.JSONException;
import org.json.me.JSONObject;

class JSONEntry
{
    JSONObject m_object;
	
	JSONEntry(JSONObject obj)
	{
	    m_object = obj;
	}

	JSONEntry(String szData)throws JSONException
	{
	    m_object = new JSONObject(szData);
	}

	boolean isEmpty()
	{
	    return m_object == null;
	}

	boolean hasName(String name)
	{
		return m_object.has(name);
	}
	
	String getString(String name)throws JSONException
	{
	    String szRes = null;
	    if ( m_object.has(name))
	    	szRes = m_object.getString(name);	    	
	
	    return szRes;
	}

	int getInt(String name)throws JSONException
	{
	    int nRes = 0;
	    if ( m_object.has(name))
	    	nRes = m_object.getInt(name);	    	
	
	    return nRes;
	}

	long getLong(String name)throws JSONException
	{
	    long nRes = 0;
	    if ( m_object.has(name))
	    	nRes = m_object.getLong(name);	    	
	
	    return nRes;
	}
	
	long getUInt64(String name)throws JSONException
	{
	    return getLong(name);
	}

	JSONEntry getEntry(String name)throws JSONException
	{
	    return new JSONEntry((JSONObject) m_object.get(name));
	}
}

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rhodes-1.5.5 platform/shared/rubyJVM/src/com/rho/sync/JSONEntry.java
rhodes-1.5.4 platform/shared/rubyJVM/src/com/rho/sync/JSONEntry.java
rhodes-1.5.3 platform/shared/rubyJVM/src/com/rho/sync/JSONEntry.java
rhodes-1.5.2 platform/shared/rubyJVM/src/com/rho/sync/JSONEntry.java
rhodes-1.5.1 platform/shared/rubyJVM/src/com/rho/sync/JSONEntry.java
rhodes-1.5.0 platform/shared/rubyJVM/src/com/rho/sync/JSONEntry.java
rhodes-1.4.2 platform/shared/rubyJVM/src/com/rho/sync/JSONEntry.java
rhodes-1.4.1 platform/shared/rubyJVM/src/com/rho/sync/JSONEntry.java
rhodes-1.4.0 platform/shared/rubyJVM/src/com/rho/sync/JSONEntry.java