locked
Convert DataTable to yaml string RRS feed

  • Question

  • User-1971168174 posted

    Hi ,

    Please help me with example for converting DataTable to yaml string.

    Thanks!

    Tuesday, June 9, 2020 1:42 PM

All replies

  • User475983607 posted

    Please help me with example for converting DataTable to yaml string.

    A DataTable is an .NET construct and might not translate well to other platforms.  However, there's YAML NuGet packages for .NET and documentation which I'm sure you'll be interested in reading.

    https://www.nuget.org/packages/YamlDotNet/

    https://github.com/aaubry/YamlDotNet/wiki

    Tuesday, June 9, 2020 1:58 PM
  • User288213138 posted

    Hi neerajkumarmodi,

    Please help me with example for converting DataTable to yaml string

    As far as I know, YAML supports only object, numeric, and scalar data types.

    Here a demo about how to convert object to YAML format:

    var serializer = new SerializerBuilder().Build();
    var yamlString = serializer.Serialize(yourObject);

    Best regards,

    Sam

    Wednesday, June 10, 2020 6:48 AM