Dart
Dart
JSON Append String Array
See more JSON Examples
Demonstrates how to append an array of strings from a string table object.Note: This example uses the AppendStringTable method, which was introduced in Chilkat v9.5.0.67
Chilkat Dart Downloads
import 'package:chilkat/chilkat.dart';
void main() {
final json = CkJsonObject();
json.emitCompact = false;
json.appendString('abc', '123');
final st = CkStringTable();
st.append('a');
st.append('b');
st.append('c');
st.append('d');
json.appendStringArray('strArray', st);
print(json.emit());
// Output:
// {
// "abc": "123",
// "strArray": [
// "a",
// "b",
// "c",
// "d"
// ]
// }
}