> On 2 Mar 2017, at 18:29, Basile Starynkevitch <bas...@starynkevitch.net> 
> wrote:
> 
> I would like that second line to be at least json_emit buf: -1.0 because I 
> need to separate objvalmo.FloatV from objvalmo.IntV types

JSON itself doesn't distinguish between integers and floats so it could be a 
bad fit for your use case. That said, since you have custom types you could 
implement FloatV.MarshalJSON (or MarshalText) and do the formatting there as 
you please. 

//jb 

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to