Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Azamat Ismagulov 10 posts 30 karma points
    Jul 02, 2014 @ 07:11
    Azamat Ismagulov
    0

    Fetch data from JSON or CSV file

    Hello,

    I have file available in two formats: JSON and CSV. As I understand work with JSON more easily nether than CSV. Could you please advice how work with that format. File contains this kind of information:

    "name": "Films",
      "count": 84,
      "frequency": "realtime",
      "version": 1,
      "newdata": true,
      "lastrunstatus": "success",
      "lastsuccess": "Wed Jul 02 2014 04:50:41 GMT+0000 (UTC)",
      "results": {
        "collection1": [
          {
            "Film": {
              "text": "WTF! Какого черта?"
            },
            "Time": [
              "Время",
              "11:00",
              "14:50",
              "16:40",
              "20:30"
            ],
            "Format": [
              "Формат",
              "-",
              "-",
              "-",
              "-"
            ],
            "Cost for adult": [
              "Взрослый",
              "700",
              "900",
              "1100",
              "1300"
            ],
            "Cost for child": [
              "Детский",
              "-",
              "-",
              "-",
              "-"
            ],
            "Cost for students": [
              "Студент.",
              "500",
              "-",
              "-",
              "-"
            ],
            "Cost for VIP": [
              "VIP",
              "-",
              "-",
              "-",
              "-"
            ],
            "Language": [
              "Язык",
              "-",
              "-",
              "-",
              "-"
            ]
          },
    ...
  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Jul 02, 2014 @ 08:19
    Jeavon Leopold
    0

    What do you want to do with this data and where is it coming from, a property editor?

  • Azamat Ismagulov 10 posts 30 karma points
    Jul 02, 2014 @ 08:39
    Azamat Ismagulov
    0

    For the begining I want to render this information into html. In future probably do some manipulation (search, CRUD operation, do some analytics). This data can be providing as site api in JSON / CSV format, and as file in JSON / CSV format.

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Jul 02, 2014 @ 10:55
    Jeavon Leopold
    0

    Ok, I would suggest you use Json.NET which is included with Umbraco to deserialize your data from Json to C# models or to it's own JObjects. You can find info on Json.NET here

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies