E
E
Evgeny Blinkov2021-03-24 10:13:10
PHP
Evgeny Blinkov, 2021-03-24 10:13:10

Why does the validator show Valid JSON but json_last_error_msg shows syntax error?

Sending long json js - php. On server

$calendar = json_decode($calendar,true, 512, JSON_PARTIAL_OUTPUT_ON_ERROR);
  if($calendar == null)
  {
    exit('error30 - bad json! -- '.json_last_error_msg());
  }
replies error30 - bad json! -- Syntax error
Checking json in online validator - Valid JSON
Can't find error, please help me.
JSON does not fit here - too long, maybe it's the length? (76689 characters)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question