Json Extensions.To Json Method
Definition
Namespace: Numerics.NET.Data.Json
Assembly: Numerics.NET.Data.Json (in Numerics.NET.Data.Json.dll) Version: 4.1.0
Assembly: Numerics.NET.Data.Json (in Numerics.NET.Data.Json.dll) Version: 4.1.0
Overload List
ToJson<T>(Index<T>, JsonSerializerOptions) | Serializes the Index<T> to a JSON string using the specified options. |
ToJson<T>(Matrix<T>, JsonSerializerOptions) | Serializes the Matrix<T> to a JSON string using the specified options. |
ToJson<T>(Vector<T>, JsonSerializerOptions) | Serializes the Vector<T> to a JSON string using the specified options. |
ToJson<T>(Index<T>, Stream, JsonSerializerOptions) | Serializes the Index<T> to a stream as JSON using the specified options. |
ToJson<T>(Matrix<T>, Stream, JsonSerializerOptions) | Serializes the Matrix<T> to a stream as JSON using the specified options. |
ToJson<T>(Vector<T>, Stream, JsonSerializerOptions) | Serializes the Vector<T> to a stream as JSON using the specified options. |
ToJson<R, C>(DataFrame<R, C>, JsonSerializerOptions) | Serializes the DataFrame<R, C> to a JSON string using the specified options. |
ToJson<R, C>(DataFrame<R, C>, Stream, JsonSerializerOptions) | Serializes the DataFrame<R, C> to a stream as JSON using the specified options. |
ToJson<R, C>(DataFrame<R, C>, JsonSerializerOptions)
Serializes the DataFrame<R, C> to a JSON string using the specified options.
public static string ToJson<R, C>(
this DataFrame<R, C> dataFrame,
JsonSerializerOptions? options = null
)
Parameters
- dataFrame DataFrame<R, C>
- The data frame to serialize.
- options JsonSerializerOptions (Optional)
- Optional. The JsonSerializerOptions to use. If null, default options are used.
Type Parameters
- R
- The type of the row keys.
- C
- The type of the column keys.
Return Value
StringA JSON string representation of the data frame.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type DataFrame<R, C>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).ToJson<T>(Index<T>, JsonSerializerOptions)
Serializes the Index<T> to a JSON string using the specified options.
public static string ToJson<T>(
this Index<T> index,
JsonSerializerOptions? options = null
)
Parameters
- index Index<T>
- The index to serialize.
- options JsonSerializerOptions (Optional)
- Optional. The JsonSerializerOptions to use. If null, default options are used.
Type Parameters
- T
- The element type of the index.
Return Value
StringA JSON string representation of the index.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type Index<T>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).ToJson<T>(Matrix<T>, JsonSerializerOptions)
Serializes the Matrix<T> to a JSON string using the specified options.
public static string ToJson<T>(
this Matrix<T> matrix,
JsonSerializerOptions? options = null
)
Parameters
- matrix Matrix<T>
- The matrix to serialize.
- options JsonSerializerOptions (Optional)
- Optional. The JsonSerializerOptions to use. If null, default options are used.
Type Parameters
- T
- The element type of the matrix.
Return Value
StringA JSON string representation of the matrix.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type Matrix<T>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).ToJson<T>(Vector<T>, JsonSerializerOptions)
Serializes the Vector<T> to a JSON string using the specified options.
public static string ToJson<T>(
this Vector<T> vector,
JsonSerializerOptions? options = null
)
Parameters
- vector Vector<T>
- The vector to serialize.
- options JsonSerializerOptions (Optional)
- Optional. The JsonSerializerOptions to use. If null, default options are used.
Type Parameters
- T
- The element type of the vector.
Return Value
StringA JSON string representation of the vector.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type Vector<T>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).ToJson<R, C>(DataFrame<R, C>, Stream, JsonSerializerOptions)
Serializes the DataFrame<R, C> to a stream as JSON using the specified options.
public static void ToJson<R, C>(
this DataFrame<R, C> dataFrame,
Stream stream,
JsonSerializerOptions? options = null
)
Parameters
- dataFrame DataFrame<R, C>
- The data frame to serialize.
- stream Stream
- The stream to write the JSON to.
- options JsonSerializerOptions (Optional)
- Optional. The JsonSerializerOptions to use. If null, default options are used.
Type Parameters
- R
- The type of the row keys.
- C
- The type of the column keys.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type DataFrame<R, C>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).ToJson<T>(Index<T>, Stream, JsonSerializerOptions)
Serializes the Index<T> to a stream as JSON using the specified options.
public static void ToJson<T>(
this Index<T> index,
Stream stream,
JsonSerializerOptions? options = null
)
Parameters
- index Index<T>
- The index to serialize.
- stream Stream
- The stream to write the JSON to.
- options JsonSerializerOptions (Optional)
- Optional. The JsonSerializerOptions to use. If null, default options are used.
Type Parameters
- T
- The element type of the index.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type Index<T>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).ToJson<T>(Matrix<T>, Stream, JsonSerializerOptions)
Serializes the Matrix<T> to a stream as JSON using the specified options.
public static void ToJson<T>(
this Matrix<T> matrix,
Stream stream,
JsonSerializerOptions? options = null
)
Parameters
- matrix Matrix<T>
- The matrix to serialize.
- stream Stream
- The stream to write the JSON to.
- options JsonSerializerOptions (Optional)
- Optional. The JsonSerializerOptions to use. If null, default options are used.
Type Parameters
- T
- The element type of the matrix.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type Matrix<T>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).ToJson<T>(Vector<T>, Stream, JsonSerializerOptions)
Serializes the Vector<T> to a stream as JSON using the specified options.
public static void ToJson<T>(
this Vector<T> vector,
Stream stream,
JsonSerializerOptions? options = null
)
Parameters
- vector Vector<T>
- The vector to serialize.
- stream Stream
- The stream to write the JSON to.
- options JsonSerializerOptions (Optional)
- Optional. The JsonSerializerOptions to use. If null, default options are used.
Type Parameters
- T
- The element type of the vector.