Forum Discussion

krupalibshah's avatar
krupalibshah
Contributor
8 years ago

Issue in parsing the date format using JSON parser

I have a simple pipeline as below,

The file contents are,

{
    "Time": {
        "_snaptype_localdatetime": "2017-12-12T10:51:12.013"
    },
    "BP_number": 2
}

When I use json parser and convert the time to string I get below output,

When using binary to document I get the correct output,

What is the JSON parser doing differently so as date is not getting converted to string?

4 Replies

  • tstack's avatar
    tstack
    Former Employee

    It looks like this file was generated by some of our code, did you download some preview data or use the DocumentToBinary snap?

    • krupalibshah's avatar
      krupalibshah
      Contributor

      Yes this file was generated using SL, I saw when I use JSON parser to read this file it does not convert the date into String but when I do it using binarytodocument it does it as require.