QCElemental icon indicating copy to clipboard operation
QCElemental copied to clipboard

Added ability for .json() to accept kwargs. model.json() can now crea…

Open coltonbh opened this issue 2 years ago • 1 comments

…te a pretty string with .json(indent=4)

Description

The current implementation of serialize does not accept generic kwargs, so we loose the basic ability to modify serialized output, like pretty printing a json string with model.json(indent=4). I'm implemented serialize to be slightly more generic so we maintain functionality described in the pydantic docs

Changelog description

Added ability for .json() to accept kwargs. model.json() can now create a pretty string with .json(indent=4)

Status

  • [x ] Code base linted
  • [ x] Ready to go

coltonbh avatar Mar 24 '23 18:03 coltonbh

Tagging @loriab and @bennybp for a review. Thanks guys! The CI format and build are failing for reasons unrelated to my PR.

coltonbh avatar Mar 24 '23 21:03 coltonbh