xclud / dart_kubernetes

Kubernetes client for Dart/Flutter.
https://pub.dev/packages/kubernetes
MIT License
14 stars 5 forks source link

IntOrString.toJson #5

Closed kaaninel closed 10 months ago

kaaninel commented 10 months ago

toJson implementation is missing in IntOrString class so while creating a Service json serialization throw an error. As a workaround I'm extending this class and using that instead.

class IntOrStringJSON extends IntOrString {
  IntOrStringJSON(super.value);
  Object toJson() => value;
}

I'm not sure if this project is still maintained so I didn't create a pull request but I can if @xclud is interested.

xclud commented 10 months ago

Hi. Thanks for the suggestion. Please do the PR.

kaaninel commented 10 months ago

Please check #6

xclud commented 10 months ago

Merged!