Added support to create and update instances from JSON