Was this article helpful?

Class GSObject

Modified 18:27, 14 Apr 2013 by shirly
Table of contents

Used for passing parameters, for example when issuing requests or receiving response data. The object holds [key, value] pairs. The key represents a parameter name (type String) and the value may be one of the following types:

  • String
  • boolean
  • int
  • long
  • double
  • GSObject
  • NSArray

 

Method Summary

Method Description
(id) objectWithJSONString:(NSString*)pJSONString Initialization method. The method receives a JSON string and parses it into this object.
(void) putGSObjectValue:(GSObject *)pValue    forKey:(NSString *)pKey
(void) putNSArrayValue:(NSArray*)value    forKey:(NSString *)key
(void) putStringValue:(NSString*)value    forKey:(NSString *)key
(void) putIntValue:(int)value forKey:(NSString *)key
(void) putLongValue:(long)value forKey:(NSString *)key
(void) putBoolValue:(bool)value forKey:(NSString *)key
(void) putDoubleValue:(double)Value    forKey:(NSString *)pKey
Methods for adding a [key, value] pair to this object.
(int)    getInt:(NSString *)key
(int)    getInt:(NSString *)key defaultValue:(int)value
(long)    getLong:(NSString *)key
(long)    getLong:(NSString *)key defaultValue:(long)value
(bool)    getBool:(NSString *)key
(bool)    getBool:(NSString *)key defaultValue:(bool)value
(NSString*)    getString:(NSString *)key
(NSString*)    getString:(NSString *)key defaultValue:(NSString *)value
(double)    getDouble:(NSString *)key
(double)    getDouble:(NSString *)key defaultValue:(double)value
(GSObject*)    getObject:(NSString *)key
(NSArray*)    getArray:(NSString *)key             // array of GSObject
Methods for retrieving value by key.
(id)    clone Returns a deep copy of this object.
void)    remove:(NSString*)key  
(bool)    contains:(NSString*)key Returns true if this object contains a mapping for the specified key.
(void)    clear Removes all of the entries from this object.
(NSArray *)    getKeys Returns an array of strings, containing the keys in this object.
(NSString *)    stringValue Returns this object's content as a JSON string.
(int)    count  
Was this article helpful?
Pages that link here
Page statistics
1681 view(s) and 2 edit(s)
Social share
Share this page?

Tags

This page has no custom tags set.

Comments

You must to post a comment.

Attachments