Sha256: a887f309aa45aebb800b075050a543760ed9c5b0f3cfd6f4ff1d5d7258197772

Contents?: true

Size: 1.04 KB

Versions: 9

Compression:

Stored size: 1.04 KB

Contents

#pragma once

#include "common/RhoStd.h"

struct json_object;
struct array_list;

namespace rho {
namespace json {

class CJSONEntry
{
    struct json_object* m_rootObject;
    struct json_object* m_object;
public:
    CJSONEntry(struct json_object * obj);
    CJSONEntry(const char* szData);
    CJSONEntry() : m_rootObject(null){}
    ~CJSONEntry();

    boolean isEmpty();
	boolean hasName(String name);

    int getInt(const char* name);
    uint64 getUInt64(const char* name);
    const char* getString(const char* name);

    CJSONEntry getEntry(const char* name);

    struct json_object* getObject(){ return m_object; }
};

class CJSONArrayIterator
{
    struct json_object* m_rootObject;
    struct array_list*  m_array;
    int                 m_nCurItem;

public:
    CJSONArrayIterator(const char* szData);
	CJSONArrayIterator(CJSONEntry& oEntry, const char* strName);
    ~CJSONArrayIterator(void);

    boolean isEnd();
    void    next();
    void    reset(int nPos);
    int     getCurPos(){ return m_nCurItem; }

    CJSONEntry getCurItem();
};

}
}

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rhodes-1.5.5 platform/shared/json/JSONIterator.h
rhodes-1.5.4 platform/shared/json/JSONIterator.h
rhodes-1.5.3 platform/shared/json/JSONIterator.h
rhodes-1.5.2 platform/shared/json/JSONIterator.h
rhodes-1.5.1 platform/shared/json/JSONIterator.h
rhodes-1.5.0 platform/shared/json/JSONIterator.h
rhodes-1.4.2 platform/shared/json/JSONIterator.h
rhodes-1.4.1 platform/shared/json/JSONIterator.h
rhodes-1.4.0 platform/shared/json/JSONIterator.h