JsonFactory<T> typedef

JsonFactory<T> = T Function(Map<String, dynamic>)

JSON serialization round-trip helper for models.

Verifies that a model class serializes and deserializes without information loss for the given set of field keys.

Use in tests:

expect(jsonRoundTrip(Capability.fromJson, {'name': 'test', ...}), isTrue);

Implementation

typedef JsonFactory<T> = T Function(Map<String, dynamic>);