The documentation on Using Assignment goes through the different submission types. Sorry I can't help with the JSon errors but I have changed my subject title to reflect the problem.
Assignment
How to recreate Offline Assignment type in moodle 3.1.1
This discussion has been locked so you can no longer reply to it.