JSON - ตัวอย่างพื้นฐานของ JSON Schema

ตอบกระทู้

รูปแสดงอารมณ์
:icon_plusone: :like: :plusone: :gfb: :-D :) :( :-o 8O :? 8) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen: :angry: :baa: :biggrin:
รูปแสดงอารมณ์อื่นๆ

BBCode เปิด
[img] เปิด
[url] เปิด
[Smile icon] เปิด

กระทู้แนะนำ
   

มุมมองที่ขยายได้ กระทู้แนะนำ: JSON - ตัวอย่างพื้นฐานของ JSON Schema

JSON - ตัวอย่างพื้นฐานของ JSON Schema

โดย buay » 12/06/2014 10:27 am

ตัวอย่างพื้นฐานของ JSON Schema

โค้ด: เลือกทั้งหมด

{
	"title": "Profile",
	"type": "object",
	"properties": {
		"firstName": {
			"type": "string"
		},
		"lastName": {
			"type": "string"
		},
		"age": {
			"description": "Age in years",
			"type": "integer",
			"minimum": 0
		}
	},
	"required": ["firstName", "lastName"]
}
title : กำหนดชื่อเรื่อง
type : กำหนดประเภท
properties : กำหนดค่าประเภทของข้อมูล และค่าต่ำสุด สูงสุด ที่จะใช้ได้ไฟล์ JSON
minimum : กำหนดค่าต่ำสุด
description : อธิบายรายละเอียด
required : การเรียกค่าที่ต้องการ

ข้างบน