adapt old function to jsoneditor