@@ -31,7 +31,8 @@ Base.length(a::JSON.Object) = div(collection_length(a), 2)
31
31
32
32
# Iterate
33
33
34
- function Base. iterate (j:: JSON.Object , (i, c) = (j. i, 0x00 ))
34
+ Base. iterate (j:: JSON.Object , i = (j. i, 0x00 )) = _iterate (j, i)
35
+ function _iterate (j:: JSON.Object , (i, c))
35
36
36
37
i, c = nextindex (j, i, c)
37
38
@@ -107,15 +108,11 @@ end
107
108
108
109
# IOString Wrappers
109
110
110
- # FIXME
111
- # Base.length(j::JSON.Object{IOString{T}}) where T =
112
- # pump(() -> div(collection_length(j), 2), j.s)
111
+ Base. length (j:: JSON.Object{IOString{T}} ) where T =
112
+ pump (() -> div (collection_length (j), 2 ), j. s)
113
113
114
- # Base.get(j::JSON.Object{IOString{T}}, key, default) where T =
115
- # pump(() -> _get(j, key, default), j.s)
114
+ Base. get (j:: JSON.Object{IOString{T}} , key, default) where T =
115
+ pump (() -> _get (j, key, default), j. s)
116
116
117
- # Base.done(j::JSON.Object{IOString{T}}, i) where T =
118
- # pump(() -> _done(j, i), j.s)
119
-
120
- # Base.next(j::JSON.Object{IOString{T}}, i) where T =
121
- # pump(() -> _next(j, i), j.s)
117
+ Base. iterate (j:: JSON.Object{IOString{T}} , i = (j. i, 0x00 )) where T =
118
+ pump (() -> _iterate (j, i), j. s)
0 commit comments