【单选题】以下哪个是合法的JSON对象结构( )
A: {"name":"tom","age":"23"}
B: {"name":tom,"age":23}
C: {name:"tom","age":23}
D: {name:tom,"age":23}
A: {"name":"tom","age":"23"}
B: {"name":tom,"age":23}
C: {name:"tom","age":23}
D: {name:tom,"age":23}
举一反三
- 【多选题】以下哪些是合法的josn数据表达( ) A: { "name": "zhangsan", "address":{ "city":"Beijing", "street":"Xisanqi", "postcode":100096 } } B: { "name":"zhangsan", "hobby":["篮球","羽毛球","游泳"]} C: {"name":"tom","age":"23"} D: [{"name":"tom","age":12},{"name":"rose","age":15}]
- 有如下类的定义,创建Employee对象错误的是() public class Employee{ private int age; private String name; public Employee(int age){ this.age = age; } public Employee(String name){ this.name = name; } public Employee(int age,String name){ this(age); this.name = name; } } A: Employee emp = new Employee(10); B: Employee emp = new Employee("Tom"); C: Employee emp = new Employee(); D: Employee emp = new Employee(10,"Tom");
- 下列Json格式对象正确的是 A: { name:"lin",age:19} B: { name="lin",age=19} C: { name:"lin";age:19} D: { name="lin";age=19}
- 以下语法符合JSON格式的是( )。 A: { name:'Mary';age:20, } B: { name:'Mary';age:20 } C: { name:'Mary', age:20, } D: { name:'Mary', age:20 }
- 下列是正确的Json格式对象的选项是: ( ) A: [name:”James”, age:18] B: [name=”James”, age=18] C: {name=”James”, age=18} D: {“name”:”James”, “age”:18}