Code Monkey home page Code Monkey logo

jsonfeed.net's Introduction

JsonFeed.NET v0.1.0-alpha

JsonFeed.NET is a portable .NET library for generating and consuming JSON Feed compliant site feeds.

NuGet Pre Release Twitter Follow

Supported platforms

  • .NET Framework 4.5.1+
  • UWP
  • Xamarin.iOS
  • Xamarin.Android

How To Install

Install-Package JsonFeed.NET -Pre

Sample Usage

Parsing a JsonFeed from a string

JsonFeed jsonFeed = JsonFeed.Parse(jsonFeedString);

Parsing a JsonFeed from a Url

JsonFeed jsonFeed = await JsonFeed.ParseFromUriAsync(new Uri(@"https://jsonfeed.org/feed.json"));

Creating a new JsonFeed and serializing it to a string

var jsonFeed = new JsonFeed
{
    Version = @"https://jsonfeed.org/version/1",
    Title = "Dan Rigby",
    Description = "Mobile App Development & More.",
    HomePageUrl = @"http://danrigby.com",
    FeedUrl = @"http://danrigby.com/feed.json",
    Author = new Author
    {
        Name = "Dan Rigby",
        Url = @"https://twitter.com/DanRigby"
    },
    Items = new List<FeedItem>
    {
        new FeedItem
        {
            Id = @"http://danrigby.com/2015/09/12/inotifypropertychanged-the-net-4-6-way/",
            Url = @"http://danrigby.com/2015/09/12/inotifypropertychanged-the-net-4-6-way/",
            Title = "INotifyPropertyChanged, The .NET 4.6 Way",
            ContentText = @"This would be the text of my blog post, but that would be way too verbose to put in this sample. (;",
            DatePublished = new DateTime(2015, 09, 12)
        }
    }
};

string jsonFeedString = jsonFeed.Serialize();

License

Copyright (c) 2017 Dan Rigby

Licensed under the MIT license.

jsonfeed.net's People

Contributors

danrigby avatar

Stargazers

Kevin avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.