Source/NFX/DataAccess/CRUD/RowsetBase.cs
/// <summary>
/// Reads either Table or Rowset from JSON created by WriteAsJSON.
/// </summary>
/// <returns>Total number of rows found in JSON. If this number is less than
/// result.Count, then not all rows matched the schema of the resulting rowset.</returns>
/// <remarks>
/// The schema of "result" must match the schema of the typed row T.
/// It's the responsibility of the caller to clear the "result" prior to
/// calling this function - the function appends rows to existing rowset.
/// </remarks>
Reads either Table or Rowset from JSON created by WriteAsJSON.
Reads either Table or Rowset from JSON created by WriteAsJSON .
public static int FromJSON<T>(string json,
                                          ref RowsetBase result,
                                          SetFieldFunc setFieldFunc = null)
              where T : TypedRow, new()
            {
              var map = JSONReader.DeserializeDataObject(json) as JSONDataMap;
              return FromJSON<T>(map, ref result, setFieldFunc);
            }
public static int FromJSON < T > ( string json , ref RowsetBase result , SetFieldFunc setFieldFunc = null ) where T : TypedRow , new ( ) { var map = JSONReader . DeserializeDataObject ( json ) as JSONDataMap ; return FromJSON < T > ( map , ref result , setFieldFunc ) ; }
Reads either Table or Rowset from JSON created by WriteAsJSON.
Reads either Table or Rowset from JSON created by WriteAsJSON .
Total number of rows found in JSON. If this number is less than
result.Count, then not all rows matched the schema of the resulting rowset.
Total number of rows found in JSON . If this number is less than result . Count then not all rows matched the schema of the resulting rowset .
json
string
RowsetBase
ref
setFieldFunc
SetFieldFunc
remarks
The schema of "result" must match the schema of the typed row T.
It's the responsibility of the caller to clear the "result" prior to
calling this function - the function appends rows to existing rowset.
The schema of " result " must match the schema of the typed row T . It ' s the responsibility of the caller to clear the " result " prior to calling this function - the function appends rows to existing rowset .