Skip to content

Commit 03b494d

Browse files
committed
readme about IJSONEnumerator
1 parent 6fb67ef commit 03b494d

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

README.md

+22-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ Convert a variant array into an `IJSONDocument` instance. Pass a list of key/val
1616

1717
function JSON(x: OleVariant): IJSONDocument; overload;
1818

19-
Use this overload to convert an OleVariant into an `IJSONDocument` reference.
19+
Use this overload to convert an OleVariant into an `IJSONDocument` reference:
20+
21+
* string types are parsed into a new `IJSONDocument` instance,
22+
* Null (or empty or unassigned) returns `nil`,
23+
* in all other cases the variant is probed for a reference to an `IJSONDocument` instace.
2024

2125
### IJSONDocument
2226

@@ -39,3 +43,20 @@ Clear the values of the `IJSONDocument`, but keep the list of keys. When process
3943
property Item[const Key: WideString]: OleVariant; default;
4044

4145
Get or set the value for a key. Notice this is the default property, so you can access the keys of a `IJSONDocument` by index notation (e.g.: `d['id']`)
46+
47+
### IJSONEnumerator
48+
49+
Use the `JSONEnum` function to create an `IJSONEnumerator` instance for a `IJSONDocument` reference.
50+
51+
function EOF: boolean;
52+
53+
Checks wether the enumerator is past the end of the set. Use `EOF` on a new enumerator for skipping the iteration on an empty set.
54+
55+
function Next: boolean;
56+
57+
Moves the iterator to the next item in the set. Moves the iterator to the first item on the first call. Returns false when moved past the end of the set.
58+
59+
function Key: WideString;
60+
function Value: OleVariant;
61+
62+
Returns the key or value of the current item in the set.

0 commit comments

Comments
 (0)