singer-io / singer-python

Writes the Singer format from Python
https://singer.io
Apache License 2.0
542 stars 130 forks source link

Pass kwargs to json.dumps in singer.format_message #99

Open jlujan-omg opened 5 years ago

jlujan-omg commented 5 years ago

Allow configuring json encoder by passing kwargs through to json.dumps in singer.format_message. Use case is passing data from pandas.DataFrame containing NaN to encode as null

cmerrick commented 5 years ago

Hi @jlujan-omg, thanks for your contribution!

In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes.

cmerrick commented 5 years ago

You did it @jlujan-omg!

Thank you for signing the Singer Contribution License Agreement.

kulte commented 5 years ago

When will this be merged, @cmerrick? This is very important as currently (as just one example) anything which needs to write a RecordMessage in non-ASCII is not possible.

abij commented 4 years ago

The package version updates are unrelated and therefore should be excluded.

And a test would be nice to proof that is works + better coverage. A non-ASCII test is useful, setting the json.dumps(..., ensure_ascii=False). I think this setting should default to False if you ask me.