php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76583 Valid JSON string can't be decoded
Submitted: 2018-07-05 18:57 UTC Modified: 2018-07-05 19:03 UTC
From: clark at electrobeat dot dk Assigned:
Status: Not a bug Package: json (PECL)
PHP Version: 7.2.7 OS: debian stretch
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: clark at electrobeat dot dk
New email:
PHP Version: OS:

 

 [2018-07-05 18:57 UTC] clark at electrobeat dot dk
Description:
------------
This JSON can't be decoded

https://dynaccount.dk/ocr.txt

json_decode() returns NULL

Have tested it in both PHP 7.0.27 and PHP 7.2.7

Test script:
---------------
$f = file_get_contents('/root/ocr.txt');
echo "json: $f\n";
echo "array:\n";
print_r(json_decode($f, true));


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-07-05 19:03 UTC] requinix@php.net
-Status: Open +Status: Not a bug -Package: *XML functions +Package: json
 [2018-07-05 19:03 UTC] requinix@php.net
Not valid.

Use json_last_error/json_last_error_msg to find out what the problem is.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Mar 03 15:01:24 2021 UTC