I'm brand new to Java and have always been a c kind-of-guy. That being said, I'm trying to use the JSON libraries (packages? classes? Java terminology is so damn confusing!) and am having issues adding them as a reference.

These three imports cannot be resolved:

import org.json.simple.JSONArray;

import org.json.simple.JSONObject;

import org.json.simple.JSONValue;

I went to json.org and downloaded the Java libraries but I'm not sure what to do with them. I've tried to go into project properties and add an external class to no avail. I noticed the downloaded folder is full of .java files. What am I supposed to do with these?

Sorry to present such a noob question on here, but I'm stumped.

解决方案

This is a wrong download I believe. You need JSON-Simple library from here http://code.google.com/p/json-simple/ . Your link points to another implementation.

After download the *.jar should be added to the classpath. How you do it depends on the tools you use. In Eclipse it is right-click on the project, Properties->Libraries and add the new JAR.

c#加入json库引用,添加JSON包引用;新到Java相关推荐

  1. python包之间引用_python 子包引用父包和其他子包

    python 子包引用父包和其他子包 python引用子目录很简单, 里面放个__init__.py就可以了. 如何在子目录里面引用其他目录(父目录,爷目录和同辈分目录)呢? 例如: python有项 ...

  2. jsp项目在idea需要导入什么依赖_idea中的java web项目(添加jar包介绍)和java maven web项目目录结构...

    java web项目 web项目下web根目录名称是可以更改的 idea中新建java web项目,默认src为Sources Root,当然也可以手动改,在Sources Root下右键只能新建Pa ...

  3. python创建一个json_如何为Python选择一个更快的JSON库

    使用JSON越多, 你就越有可能遇到JSON编码或解码瓶颈.Python的内置库也不错, 但是还有多个更快的JSON库可用: 如何选择使用哪一个呢? 事实是,没有一个正确的答案,没有一个最快的JSON ...

  4. python素材库_python的JSON库

    标签:mingw   mini   mic   int   module   als   str   lease   函数 JSON(JavaScript Object Notation) 是一种轻量 ...

  5. python处理json文件_python处理json文件

    广告关闭 腾讯云11.11云上盛惠 ,精选热门产品助力上云,云服务器首年88元起,买的越多返的越多,最高返5000元! python类型转换json类型的对应关系? json类型转换到python的类 ...

  6. python json解析_python读取json文件并解析

    原博文 2018-07-09 18:35 − # -*- coding: utf-8 -*- import os import json import sys reload(sys) sys.setd ...

  7. python对象转json字符串,及json字符串的格式化

    文章目录 前言 一.python对象转化成json字符串? 1.引入库 2.转化 二.json字符串的格式化 1.使用json.dumps(obj,indent=n)方法 2.示例 3.结果展示 总结 ...

  8. 几种常用 JSON 库性能比较

    点击上方"方志朋",选择"设为星标" 做积极的人,而不是积极废人 原文:www.xncoding.com/2018/01/09/java/jsons.html ...

  9. JAVA中几种常用JSON库性能比较

    点击上方"方志朋",选择"置顶公众号" 技术文章第一时间送达! 作者:飞污熊 xncoding.com/2018/01/09/java/jsons.html 本 ...

最新文章

  1. 谷歌DeepMind联合创始人被架空
  2. Python流程控制语句
  3. C++ 继承Employee类
  4. Android .9.png图片的处理
  5. getRunningTasks和getRunningAppProcesses失效
  6. sql server set赋值和select 赋值的区别以及使用方法
  7. 【报错笔记】项目中使用ArrayList<>报错:‘<>’operator is not allowed for source level below 1.7
  8. error:cannot load driver JL2CM3.dll
  9. JUC原子类-类成员(五)
  10. Java属性loadFromXML()方法与示例
  11. python Tags 母板 组件 静态文件相关 自定义simpletag inclusion_tag
  12. vs2008添加注释宏(暂未成功设置)
  13. 项目范围管理论文提纲
  14. 2021年全国大学生电子设计大赛题目
  15. 面试题:Redis 40 道
  16. 一文理解主数据和参考数据
  17. 一篇读懂jvm垃圾回收
  18. Minecraft 1.19.2 Fabric模组开发 02.物品栏+物品
  19. 九寨沟静态页面(html+css)
  20. 群晖硬盘已损毁 Linux 修复,今天群晖存储空间损毁,起死回生

热门文章

  1. 【目标检测】SSD+yolo系列(v1-v7)
  2. css布局 --- 流体布局 冻结布局 凝胶布局 绝对定位
  3. DimLayer实现和setRelativeLayer分析【Android12】
  4. PIE-engine 教程 ——MODIS影像去云教程(山西省为例)
  5. 女友在餐厅当传菜员,心疼她嗓子给她写了个语音转文字页面
  6. 指派问题程序c语言,用lingo解决一个指派问题,要求写出程序,
  7. promise.all的使用
  8. P13、14-Windows与网络基础-NTFS之文件、文件夹权限
  9. 快来看看!飞机上的Wi-Fi黑科技
  10. 网站学习心得-登陆注册功能