JSONCollection (gb.util.web)

This class represents a JSON object.

It is a collection that allows to associate a Null value with a key, which is not possible with a standard Gambas collection.

Consequently:
  • To make the difference with a non-existent key, you have to use the Exist method.

  • To remove a value, you have to use the Remove method.

It is used by the JSON.FromString() method when its UseNull argument is set.

This class inherits Collection in gb.

This class is creatable.

This class acts like a read / write array.

This class is enumerable with the FOR EACH keyword.

Inherited properties
Count   Returns the number of elements stored in the collection.
Default   Return or set the collection default value that is returned when no value is associated with a key.
Empty   Return if the collection is empty.
First   Returns the key of the first element inserted in the collection, or NULL if the collection is void.
Key   Returns the key of the last read or last enumerated element.
Keys   Return a string array of all collection keys.
Last   Returns the key of the last element inserted in the collection, or NULL if the collection is void.
Length   Returns the number of elements stored in the collection.
ReadOnly   Return or set if the collection contents is read-only.

الطرق
Copy  

Inherited methods
Add   Adds an element to the collection.
Clear   Clears the collection.
Equals   Returns if Collection is equals to the current collection.
Exist   Returns if something is associated with this key in the collection.
Insert   Insert the contents of Collection into the current collection.
Remove   Removes an element from the collection.