以下语法符合JSON格式的是( )。
A: { name:'Mary';age:20, }
B: { name:'Mary';age:20 }
C: { name:'Mary', age:20, }
D: { name:'Mary', age:20 }
A: { name:'Mary';age:20, }
B: { name:'Mary';age:20 }
C: { name:'Mary', age:20, }
D: { name:'Mary', age:20 }
举一反三
- 1)运行下面一段代码,能正确输出的是(C)。(选择两项) A: A.int age=20;string name=”如花”;<br>Console.write(“姓名”+name+”年龄”+age); B: B.int age=20;string name=”如花”;<br>Console.write(“姓名{0},年龄为{1}”,name,age); C: C.int age=20;string name=”如花”;<br>Console.write(name,age); D: D.int age;string name;<br>Console.write(“姓名”+name+”年龄”+age);
- 下列( )方法定义和调用的代码是正确的。 A: static void Introduce(string gender = "男", string name, int age = 18){} Introduce(name: "alex", age: 20); B: static void Introduce(string name, int age = 18, string gender = "男"){} Introduce(age: 20, name: "alex"); C: static void Introduce(string gender = "男", string name, int ago = 18){} Introduce(age: 20, name: "alex"); D: static void Introduce(string name, int age = 18, string gender = "男"){}Introduce(name: "alex", age: 20);
- 下列Json格式对象正确的是 A: { name:"lin",age:19} B: { name="lin",age=19} C: { name:"lin";age:19} D: { name="lin";age=19}
- 下列是正确的Json格式对象的选项是: ( ) A: [name:”James”, age:18] B: [name=”James”, age=18] C: {name=”James”, age=18} D: {“name”:”James”, “age”:18}
- 【单选题】以下哪个是合法的JSON对象结构( ) A: {"name":"tom","age":"23"} B: {"name":tom,"age":23} C: {name:"tom","age":23} D: {name:tom,"age":23}