# toJson method

Map<String, dynamic> toJson()

Converts ImageRef to json representation with acquiring serialized reference to the native resource. You must eventually call deserialize, otherwise the reference will leak

## Implementation

    Map<String, dynamic> toJson() {
      using((Arena arena) {
        Pointer<Utf8> pSource = uniqueId!.toNativeUtf8(allocator: arena);
        _nativeAcquireSerializedReference(pSource);
      });
      return <String, dynamic>{"uniqueId": uniqueId!};
    }