Changed API for JSON patch generation and added automatic change detection without Object.observe