Jump to content

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": "william.durand1@gmail.com"
        }
    ],
    "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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.