期望'EOF','}',':',',',']'变得“未定义”?

时间:2018-10-26 06:20:17

标签: android json

我已经创建了自己的JSON文件,但出现以下错误 错误:解析第4行的错误:         ... nical University“'自由职业者Android D         ---------------------- ^         期望'EOF','}',':',',',']'处于'undefined'

在我创建自己的json API的json结构下面

{
        "Introduction": [{
            "image": "https://www.dropbox.com/s/1lxgp2xj8wtv3zk/10762650.jpg?dl=0qaC8sFGR/tA4zUizSJLwx+oamRxyLDuPAPc/4Un7thhg2evDYq0Sf/9k=FLMf",
            "introduction": "My name is Yodgorbek Komilov I have graduated  Bachelor of Computer Science at Riga Technical University"
            'Freelance Android Developer who loves to create Android apps and Google Android Developer scholarship recipient.'
            'Developed more than 10 android apps'

        }],
        "Education": [{
            "duration": "2012-2014",
            "institution": "Riga Technical University Latvia, Riga",
            "degree": "Bachelor Degree in Computer Science"
        }],
        "Work": [{
                "company": "Udacity",
                "duration": " Jun 2018 - Present ",
                "responsibility": "Android Project Reviewer"
            },
            {
                "company": "Mobi Verse",
                "duration": " Jan 2018 - Present",
                "responsibility": "Developing Android apps for US market"
            },
            {
                "company": "Freelancer",
                "duration": " Jan 2017 - Present",
                "responsibility": "Developing  eCommerce  and different various android apps"
            },
            {
                "company": "Softwerk AB",
                "duration": " December 2016 - May 2017",
                "responsibility": " Maintaining existing Android apps"
            }
        ],
        "Skills": [{
            "Programming": "Java, C Sharp, Kotlin, Swift",
            "Framework/Libraries": "Android, IOS",
            "Android Architecture Components": "Live Data, ViewModel, Room",
            "Software Methodologies": "Agile, Scrum, Waterfall",
            "IDE'S": "Eclipse, Android Studio, Xcode"
        }],
        "Contact": [{
            "Linkedin": "https://www.linkedin.com/in/edgar-sweden/",
            "gmail": "kyodgorbek@gmail.com",
            "phone number": "+46760981871"
        }]
}

3 个答案:

答案 0 :(得分:0)

"introduction": “My name is Yodgorbek Komilov I have graduated Bachelor of Computer Science at Riga Technical University Freelance Android Developer who loves to create Android apps and Google Android Developer scholarship recipient. Developed more than 10 android apps”
}]

因为在大学之后您关闭了双引号,所以键 introduction 的值在那里结束。如果之后的所有内容都是其他信息,则需要为此提供一个新密钥。

答案 1 :(得分:0)

您的JSON数据有错误。如果需要多行字符串,请使用\n。因此,您需要像这样设置introduction字段:

"introduction": "My name is Yodgorbek Komilov I have graduated  Bachelor of Computer Science at Riga Technical University\nFreelance Android Developer who loves to create Android apps and Google Android Developer scholarship recipient.\nDeveloped more than 10 android apps"

并非我认为您不需要在文本中使用单引号'

答案 2 :(得分:0)

您已经关闭了应该连续的字符串。您可以在json下面使用。

{
    "Introduction": [{
        "image": "https://www.dropbox.com/s/1lxgp2xj8wtv3zk/10762650.jpg?dl=0qaC8sFGR/tA4zUizSJLwx+oamRxyLDuPAPc/4Un7thhg2evDYq0Sf/9k=FLMf",
        "introduction": "My name is Yodgorbek Komilov I have graduated  Bachelor of Computer Science at Riga Technical University Freelance Android Developer who loves to create Android apps and Google Android Developer scholarship recipient. Developed more than 10 android apps."
    }],
    "Education":// your other code as it is
}

如果不确定是否有足够的online services,请始终验证json。