1
+ using System ;
2
+
3
+ namespace Openize . Cells
4
+ {
5
+ /// <summary>
6
+ /// Configuration options for JSON import and export operations.
7
+ /// </summary>
8
+ public class JsonOptions
9
+ {
10
+ /// <summary>
11
+ /// Gets or sets whether to include property names as headers in the first row.
12
+ /// </summary>
13
+ public bool IncludeHeaders { get ; set ; } = true ;
14
+
15
+ /// <summary>
16
+ /// Gets or sets the date format for parsing and formatting date values.
17
+ /// </summary>
18
+ public string DateFormat { get ; set ; } = "yyyy-MM-dd" ;
19
+
20
+ /// <summary>
21
+ /// Gets or sets the date-time format for parsing and formatting datetime values.
22
+ /// </summary>
23
+ public string DateTimeFormat { get ; set ; } = "yyyy-MM-dd HH:mm:ss" ;
24
+
25
+ /// <summary>
26
+ /// Gets or sets whether to auto-detect data types during import.
27
+ /// </summary>
28
+ public bool AutoDetectDataTypes { get ; set ; } = true ;
29
+
30
+ /// <summary>
31
+ /// Gets or sets the number format culture (e.g., "en-US", "de-DE").
32
+ /// </summary>
33
+ public string Culture { get ; set ; } = "en-US" ;
34
+
35
+ /// <summary>
36
+ /// Gets or sets whether to ignore null or empty values during import.
37
+ /// </summary>
38
+ public bool IgnoreNullValues { get ; set ; } = false ;
39
+
40
+ /// <summary>
41
+ /// Gets or sets the maximum number of records to import (0 = no limit).
42
+ /// </summary>
43
+ public int MaxRecords { get ; set ; } = 0 ;
44
+
45
+ /// <summary>
46
+ /// Gets or sets whether to flatten nested objects into columns with dot notation.
47
+ /// Example: {"user": {"name": "John"}} becomes "user.name" column.
48
+ /// </summary>
49
+ public bool FlattenNestedObjects { get ; set ; } = false ;
50
+
51
+ /// <summary>
52
+ /// Gets or sets the separator for flattened nested object property names.
53
+ /// </summary>
54
+ public string NestedPropertySeparator { get ; set ; } = "." ;
55
+
56
+ /// <summary>
57
+ /// Gets or sets whether to handle arrays by converting them to comma-separated strings.
58
+ /// </summary>
59
+ public bool ConvertArraysToStrings { get ; set ; } = true ;
60
+
61
+ /// <summary>
62
+ /// Gets or sets the separator for array values when converting to strings.
63
+ /// </summary>
64
+ public string ArrayValueSeparator { get ; set ; } = ", " ;
65
+ }
66
+ }
0 commit comments