---
title: "What are the various JSON files available in ASP.NET Core?"  
description: "What are the various JSON files available in ASP.NET Core?"  
author: "Sanjay Goenka"  
published: 2023-03-06  
updated: 2023-07-08  
canonical: https://www.mindstick.com/forum/157459/what-are-the-various-json-files-available-in-asp-dot-net-core  
category: "asp.net core"  
tags: ["asp.net", "asp.net core"]  
reading_time: 2 minutes  

---

# What are the various JSON files available in ASP.NET Core?

What are the various [JSON](https://www.mindstick.com/forum/34446/convert-json-string-to-object) [files](https://www.mindstick.com/articles/23302/the-importance-and-advantage-of-keeping-your-important-files-on-the-cloud) available in [ASP.NET Core](https://www.mindstick.com/articles/12946/get-started-with-asp-dot-net-core-mvc-and-visual-studio)?

## Replies

### Reply by Aryan Kumar

There are mainly 6 configuration JSON files in [ASP.NET](https://www.mindstick.com/articles/934/default-folders-available-inside-the-asp-dot-net-application-folder) Core:

- **global.json** - This file is used to specify the .NET SDK version that will be used by ASP.NET Core projects.
- **launchsettings.json** - This file is used to specify the startup command for ASP.NET Core projects.
- **appsettings.json** - This file is used to store application settings, such as database connection strings and API keys.
- **bundleconfig.json** - This file is used to define bundles of JavaScript and CSS files that can be loaded by ASP.NET Core applications.
- **project.json** - This file is used to define the project's dependencies and build configuration.
- **bower.json** - This file is used to define the client-side dependencies for an ASP.NET Core application.

In addition to these configuration files, ASP.NET Core also supports using JSON to serialize and deserialize objects. This can be done using the `System.Text.Json` library, which is included in the .NET Framework.

Here are some examples of how JSON can be used in ASP.NET Core:

- To store application settings in a JSON file, you can use the following code:

C#

```plaintext
public class Startup
{
    public void ConfigureServices(IServiceCollection services)
    {
        services.AddSingleton(new ConfigurationBuilder()
            .AddJsonFile("appsettings.json")
            .Build());
    }
}
```

- To serialize an object to JSON, you can use the following code:

C#

```plaintext
public class User
{
    public string Name { get; set; }
    public int Age { get; set; }
}

public class Example
{
    public void SerializeObjectToJson()
    {
        User user = new User() { Name = "John Doe", Age = 30 };
        string json = JsonConvert.SerializeObject(user);
        Console.WriteLine(json);
    }
}
```

- To deserialize a JSON string to an object, you can use the following code:

C#

```plaintext
public class Example
{
    public void DeserializeJsonToObject()
    {
        string json = @"{
            "Name": "Jane Doe",
            "Age": 25
        }";
        User user = JsonConvert.DeserializeObject<User>(json);
        Console.WriteLine(user.Name);
        Console.WriteLine(user.Age);
    }
}
```


---

Original Source: https://www.mindstick.com/forum/157459/what-are-the-various-json-files-available-in-asp-dot-net-core

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
