Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 876621
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T11:27:49+00:00 2026-05-15T11:27:49+00:00

I have a huge chunk, so large that I can’t manually edit the file

  • 0

I have a huge chunk, so large that I can’t manually edit the file and need to read it in and do regex operations to see what’s wrong.

Basically – my server is PHP 5.1.6 and I can’t update it. This features an older json_decode which is less featured than the 5.2/5.3 versions.

json_decode returns NULL and json_last_error is being invoked but the function doesn’t exist except in PHP 5.3 so I’m manually trying to see what’s wrong.

$regex = '#[^0-9"$a-zA-Z{:}().]#';
$json = preg_replace( $regex, '', $json );
$tree = json_decode ( $json, true );

var_dump($tree); // NULL

A snippet of the JSON.. somewhere in the middle

{“109″:0,”103″:1,”102″:59,”101″:70,”100″:4299,”94″:0,”50″:51,”46″:0,”45″:0,”44″:0,”43″:0,”42″:0,”23″:0,”22″:0,”18″:0,”17″:1,”16″:1,”13″:160,”8″:4298}},”2”:{“d”:{“109″:0,”103″:92,”102″:54,”101″:53,”100″:4301,”94″:0,”50″:4278,”49″:328,”46″:1,”45″:0,”44″:1,”43″:0,”42″:0,”26″:0,”23″:0,”22″:0,”18″:0,”17″:1,”16″:1,”8″:4300},”m”:{“94″:1,”100″:1,”26″:1,”50″:1,”8″:1,”49″:1,”18″:1,”43″:1,”42″:1,”109″:1},”c”:{“/”:{“d”:{“109″:0,”100″:4301,”94″:0,”50″:4278,”49″:328,”43″:0,”42″:0,”26″:0,”18″:0,”8″:4300}},”G”:{“d”:{“109″:1,”100″:4303,”94″:1,”68″:17,”50″:64,”49″:53,”43″:1,”42″:1,”34″:0,”18″:1,”13″:2216,”11″:0,”8″:4302}}}},”3”:

The }}}} is suspicious but this probably just closes 4 nested object literals.

Would appreciate any insight.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T11:27:50+00:00Added an answer on May 15, 2026 at 11:27 am

    I ran the data several times through the JSON formatter/validator and it was valid. The dataset is too huge that even using VIM to kill nested objects is a lot of work.

    I was able to run this dataset locally, so I’m going to conclude it is an issue with the nested limit of 20 for PHP 5.1 where it gets bumped up in PHP 5.2 and 5.3.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a huge C file (~100k lines) which I need to be able
I have multiple classes (controllers) that share a huge chunk of code with each
I have huge file (17 million lines) that contains content in this format: AB101XG,57.144165160000000|,-2.114847768000000|;
I have a huge chunk of legacy data in a format that looks somewhat
I have huge amount of data from database, i need to get or store
I have huge data which is static. I need to save it within the
I have a huge java codebase (more than 10,000 java classes) that makes extensive
I have a huge text file and I wanted to write a program which
I have a large data file, which is zipped, and approximately 20MB. When it's
I have a HUGE file with a lot of HL7 segments. It must be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.