scalarFromJson function

Scalar scalarFromJson(
  1. DataType type,
  2. Object? json, {
  3. Array? dictionary,
})

Decodes and validates a scalar in the owned-JSON physical value format.

Implementation

Scalar scalarFromJson(DataType type, Object? json, {Array? dictionary}) =>
    Array._fromRaw(type, [
      json == null ? null : _valueFromJson(type, json),
    ], dictionary: dictionary)[0];