Field.ExportValueToJson

Field.ExportValueToJson method

Exports the content of the specified field into a JSON stream. Button field value are not exported.

public void ExportValueToJson(Stream outputJsonStream, bool indented = true)
ParameterTypeDescription
outputJsonStreamStreamThe output JSON stream where the field data will be written.
indentedBooleanOptional. Specifies whether the JSON output should be indented for better readability. The default value is true.

Examples

Document document = new Document("PdfDoc.pdf");
FileStream fs = new FileStream("export.json", FileMode.Create, FileAccess.Write);
Field field = document.Form.Fields[0];
field.ExportValueToJson(fs);
fs.Close();

See Also