go-units icon indicating copy to clipboard operation
go-units copied to clipboard

JsonMarshall

Open clausMeko opened this issue 2 years ago • 1 comments

Hey guys,

units.Unit has no native JsonMarshall method. I.e. when creating json from it those fields remain empty.

What is your recommended approach to that for us users?

Cheers, Claus

clausMeko avatar Mar 21 '23 07:03 clausMeko

What would be the preferred JSON output? I might suggest that a PR be added that adds the JsonMarshaller wraps over the existing String() methods (as output to console.)

Would this be a worthwhile solution?

Leila-Codes avatar Feb 05 '24 11:02 Leila-Codes