Where to put encoders, decoders and generators?

I’ve been doing option 2, so I can import Json.Encode or Decode at module scope as appropriate.