| SerializableEntityLoadAll(Stream) Method |
This is preliminary documentation and is subject to change.
Synchronously enumerates a JSON array of the serialized Wikibase entities contained in the specified stream.
Namespace: WikiClientLibrary.WikibaseAssembly: WikiClientLibrary.Wikibase (in WikiClientLibrary.Wikibase.dll) Version: 0.9.0-int.2+447d1d590e6726b7881f750a0a0e42908f3e417e
Syntax public static IEnumerable<SerializableEntity?> LoadAll(
Stream s
)
Public Shared Function LoadAll (
s As Stream
) As IEnumerable(Of SerializableEntity)
Dim s As Stream
Dim returnValue As IEnumerable(Of SerializableEntity)
returnValue = SerializableEntity.LoadAll(s)
public:
static IEnumerable<SerializableEntity^>^ LoadAll(
Stream^ s
)
static member LoadAll :
s : Stream -> IEnumerable<SerializableEntity>
Parameters
- s Stream
- The stream from which to read serialized entity JSON.
Return Value
IEnumerableSerializableEntity
A sequence that, when enumerated, will read a JSON array from the stream, and parses it
into a sequence of
SerializableEntitys.
If there is
null in the JSON array,
null will be enumerated in the sequence.
Exceptions Exception | Condition |
---|
JsonException | The stream does not contain a JSON array of objects; OR there is extraneous content after the root JSON array. |
Remarks This method is recommended when you are working with a large JSON dump of Wikibase entities,
because it only put the current enumerated entity in the memory. Still, you can use
ToListAsync``1(IAsyncEnumerableUMP, CancellationToken) to materialize all the entities at once.
Due to the buffering mechanism of the implementation, if you stopped enumeration at the middle
of the returned sequence, s may stop at a point later than the last deserialized
JSON array item (JSON object).
Unlike other [!:overloads:Load] overloads, this method returns empty sequence
if s does not contain any content.
See Also