Announcement

Collapse
No announcement yet.

JSON feed reader

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • JSON feed reader

    I have this JSON feed from our interactive team and it is not being read by the different feed sources in Feed Streamer not sure what I need to add to get it to work?
    Not sure if I need to edit this file Vizrt.Socialize.Plugins.XML_JSON.xml to get the feed to work?

    Thanks
    Dale

  • #2
    In order to create a reader for a particular service, you simply add information
    about the service and how you want to use it to an XML configuration file called
    Socialize.Plugins.XML_JSON.xml, or create it in a file with the name format
    Socialize.Plugins.XML_JSON.[Your Name].xml.

    You need to make sure your changes are copied to all Feed Streamer and Social TV server installations.
    (C:\Program Files (x86)\vizrt\Viz Feed Streamer\Plugins\)

    Use the Feed Streamer user manual to help with this process.
    documentation.vizrt.com/feed-streamer-guide-1.2.pdf
    See section 8 Defining Custom Readers.

    Here is a sample reader that was used to read a JSON feed with leaderboard:

    <ReaderTypes>
    <Reader Name="LEADERBOARD">
    <Image>https://docs.vizrt.com/vizstvfs/fsplugins/images/sources/RSS-icon.png</Image>
    <Attributes>
    <Attribute>
    <Key>IsFeedReflectionOptional</Key>
    <Value>True</Value>
    </Attribute>
    </Attributes>
    <Request>
    <Url>{url}</Url>
    <Parameters>
    <Parameter Mandatory="True">
    <Name>{url}</Name>
    <Caption>Feed URL</Caption>
    <Type>uri</Type>
    <Value></Value>
    </Parameter>
    </Parameters>
    </Request>
    <Response>
    <Root>//player</Root>
    <entry xmlns="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/">
    <id>{\*[local-name()=&quot;position&quot;][last()]}</id>
    <title>{username}</title>
    <summary>{points}</summary>
    <link rel="enclosure" href="{image/url}" type="{image/type}"/>
    </entry>
    </Response>
    </Reader>
    </ReaderTypes>

    The JSON feed looked like this:

    {
    "leaderboard": {
    "player": [
    {
    "position": "1",
    "username": "Ross",
    "points": "970",
    "image": {
    "url": "https://ak-static.cms.nba.com/wp-content/uploads/headshots/nba/latest/260x190/203082.png",
    "type": "image/png"
    }
    },
    {
    "position": "2",
    "username": "DeRozan",
    "points": "700",
    "image": {
    "url": "https://ak-static.cms.nba.com/wp-content/uploads/headshots/nba/latest/260x190/201942.png",
    "type": "image/png"
    }
    },
    {
    "position": "3",
    "username": "Lowry",
    "points": "650",
    "image": {
    "url": "https://ak-static.cms.nba.com/wp-content/uploads/headshots/nba/latest/260x190/200768.png",
    "type": "image/png"
    }
    }
    ]
    }
    }

    Comment

    Working...
    X