O'Reilly logo

Xamarin Essentials by Mark Reynolds

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Extending the sample app

Now, it's time to extend the app. We have two primary tasks before us:

  • Create a way for national parks to be loaded and saved from a file
  • Enhance the user interface to show all of the appropriate attributes and allow to view and edit data

Storing and loading national parks

We will use a simple JSON-formatted text file to store information. .NET provides libraries to accomplish this, but the library I have had the most success with is Json.NET. Json.NET is an open source library created by James Newton-King, and this is definitely worth considering. Json.NET is also available in the Xamarin component store, so we can add it to our project directly from there.

Adding Json.NET

To add Json.NET to the sample app, perform the following ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required