Field.ImportValueFromJson
Contents
[
Hide
]ImportValueFromJson(Stream)
Imports data into the specified fields from a JSON stream, based on an exact match of the fields’ full names.
public bool ImportValueFromJson(Stream inputJsonStream)
Parameter | Type | Description |
---|---|---|
inputJsonStream | Stream | The input JSON stream containing the field data to be imported into the field. |
Return Value
True if the field was found in JSON stream; otherwise - false
Examples
Document document = new Document("PdfDoc.pdf");
FileStream fs = new FileStream("import.json", FileMode.Open, FileAccess.Read);
Field field = document.Form.Fields[0];
field.ImportValueFromJson(fs);
fs.Close();
document.Save();
See Also
- class Field
- namespace Aspose.Pdf.Forms
- assembly Aspose.PDF
ImportValueFromJson(Stream, string)
Imports data into the specified field from a JSON stream, using the full name specified in the ‘fieldFullNameInJSON’ variable for matching.
public bool ImportValueFromJson(Stream inputJsonStream, string fieldFullNameInJSON)
Parameter | Type | Description |
---|---|---|
inputJsonStream | Stream | The input JSON stream containing the field data to be imported into the field. |
fieldFullNameInJSON | String | The name of the data within the JSON stream for matching. If the data within the JSON stream has a nested structure, the full name should be specified with all parent and child items separated by ‘.’ |
Return Value
True if the field was found in json file; otherwise - false
Examples
Document document = new Document("PdfDoc.pdf");
FileStream fs = new FileStream("import.json", FileMode.Open, FileAccess.Read);
Field field = document.Form.Fields[0];
field.ImportValueFromJson(fs, "GroupName.AnotherFieldName");
fs.Close();
document.Save();
See Also
- class Field
- namespace Aspose.Pdf.Forms
- assembly Aspose.PDF