Jump to content

JSON Syntax Error


anevins

Recommended Posts

Hello,

 

I'm not sure why I'm receiving a syntax error.

 

The error is:

  [seld\JsonLint\ParsingException]
  "composer.json" does not contain valid JSON
  Parse error on line 1:
  0
  ^
  Expected one of: 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '['

 

I'm receiving that error from Git Bash.

 

The contents of composer.json is

{
    "name": "willdurand/geocoder",
    "type": "library",
    "description": "The almost missing Geocoder PHP 5.3 library.",
    "keywords": ["geocoder", "geocoding", "abstraction", "geoip"],
    "homepage": "http://geocoder-php.org",
    "license": "MIT",
    "authors": [
        {
            "name": "William Durand",
            "email": "[email protected]"
        }
    ],
    "require": {
        "php": ">=5.3.0"
    },
    "suggest": {
        "kriswallsmith/buzz": "Enabling Buzz allows you to use the BuzzHttpAdapter, it's the recommended HTTP layer.",
        "ext-curl": "Enabling the curl extension allows you to use CurlHttpAdapter."
    },
    "autoload": {
        "psr-0": { "Geocoder": "src/" }
    },
    "extra": {
        "branch-alias": {
            "dev-master": "1.0-dev"
        }
    }
}

 

Can anyone help me solve this please?

Link to comment
https://forums.phpfreaks.com/topic/267923-json-syntax-error/
Share on other sites

Nevermind, I was looking at the wrong file! Dipshit!

 

This is the actual file

/* 
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

{
    "require": {
        "willdurand/geocoder": "*"
    }
}

 

Netbeans created some comments at the top of the file.

Link to comment
https://forums.phpfreaks.com/topic/267923-json-syntax-error/#findComment-1374732
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.