blob: dec44aa2b303e4e6cab0aded98c05c467846de9b [file] [log] [blame]
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// A value is a boolean, integer, float, string, vector, or dictionary.
union Value {
bool bit;
int64 inum;
float64 fnum;
string str;
Vector vec;
Dictionary dict;
// TODO(CP-154): Consider adding blobs.
// A vector is a sequence of values.
struct Vector {
vector<Value?> values;
// A dictionary is a sequence of key/value pairs.
// Keys must be unique and sorted in lexicographically increasing order.
struct Dictionary {
vector<Entry> entries;
// A key/value pair in a |Dictionary|.
struct Entry {
string key;
Value? value;