TOON son dönemde popüler olsa da nested veri yapılarında her zaman en düşük maliyeti sağlamaz. Asıl tasarruf mimariyi değiştirmekten gelir.
Bu yazıda:
Sadece tender_id ve bids çıkarılır.
Adres, lisans, numeric para ayrıştırma local parsers ile yapılır.
AGENCY: Example Transportation Authority
PROJECT ID: 00-X00001
COUNTY: NORTHFIELD
**Bidder 1:** Alpha Infrastructure Group
Address: 101 Example Road, Eastville, EX 90001
Phone: (555) 100-2000
License: FAKE12345
Total Bid: $1,234,567.89
{
"type": "object",
"properties": {
"tender_id": {"type": "string"},
"bids": {
"type": "array",
"items": {
"type": "object",
"properties": {
"firm": {"type": "string"},
"amount": {"type": "string"}
},
"required": ["firm", "amount"]
}
}
},
"required": ["tender_id", "bids"]
}
{
"tender_id": "00-X00001",
"bids": [
{"firm": "Alpha Infrastructure Group", "amount": "$1,234,567.89"}
]
}
{
"tender_id": "00-X00001",
"bids": [
{
"firm": "Alpha Infrastructure Group",
"amount": {
"raw": "$1,234,567.89",
"numeric": 1234567.89,
"currency": "USD"
},
"address": {
"street": "101 Example Road",
"city": "Eastville",
"state": "EX",
"zip": "90001"
},
"license": "FAKE12345",
"phone": "(555) 100-2000"
}
]
}
Bu mimari: