google / google/json_serializable.dart

request: include common interface to allow us to indicate object supports toJson

Open
#1,376 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
1.6k
Forks
461
Avg merge
45m
Merged PRs (30d)
1

Description

I have a lot of different projects that need to know (or require) if an object is serializable to json. I've got an Iserializable interface, but as the projects grow and especially as I'm starting to try to seperate some of them into publishable packages, the question of where to put the interface is getting more and more convoluted.

At this point, I'm probably just going to make a to_json_interface package that does nothing but provide that one interface.

It would be great if json_serializable_annotation already included something like this as I'm sure other packages would like the ability to know this as well.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.