Handling problems with JSON string creation - manually creating in case of failure.