Adding the Newtonsoft.Json NuGet package to our solution

In this section, we will begin by adding the Newtonsoft.Json NuGet package to our TrackMyWalks shared-core solution, which is essentially a high-performance JSON framework for the .NET platform, which allows you to serialize and deserialize any type of .NET object with help from the JSON serializer class.

We will also have the ability to translate LINQ capabilities into JSON to enable us to create, parse, query, and modify the JSON structure that we receive back from our WalkEntries table, located on the Microsoft Azure platform.

Let's start by adding the Newtonsoft.Json NuGet package to our TrackMyWalks app by going through the following steps:

  1. Right-click on the Dependencies | NuGet folder, located within the TrackMyWalks solution, and choose the Add Packages... menu option, as you did in Chapter 4, Creating the TrackMyWalks Native App.
  1. Next, within the Search field located within the Add Packages dialog, you need to enter json.net and select the Newtonsoft.Json option within the list, as shown in the following screenshot:

Adding the Newtonsoft.Json NuGet Package
  1. Then, make sure that you choose the latest version to install from the drop-down list for the Version field (this will be displayed by default).
  2. Finally, click on the Add Package button to add the Newtonsoft.Json NuGet package to the TrackMyWalks shared-core solution.

Now that you have added the NuGet package for the Newtonsoft.Json, we can begin utilizing this control by updating our WalkDataModel class to include additional JsonProperty attributes that will be used by our instances of ViewModel and ContentPage (views), which we will cover in the next section.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.15.99