Based on your error, it is the way you are trying to convert the model into json format is probably needs a review. There is a GitHub repo provided for this in the GitHub repo for this specialisation which is public, so you can have a look.
Another issue could be incompatibility between the autograder assignment and tf.version you are using and the python version in your local system.
When I had this issue, the below comment by James helped me resolve the issue
I am also sharing my post created thread when I had the issue, for you to understand what all issues I went through while passing this assignment.