When importing JSON files it says "this file should not be imported in this context"?

If you are attempting to import Headers, Footers or Single Blog Layouts then please make sure you are importing the JSON files within your Theme Builder Template and NOT importing to the Divi Library. Importing to the Divi Library will not work.

For all other Sections or Layouts please make sure you're importing them directly into your Page either via drag-and-drop or via Divi's portability system.

Please refer to this documentation article or detailed guides

If you use the WordFence Security plugin, please review this guide.

Finally, please check with your hosting provider if they have set any restrictions on uploading JSON files.