summaryrefslogtreecommitdiff
path: root/Plugins/MonoGame.Extended/source/MonoGame.Extended.Content.Pipeline/Json/JsonContentImporter.cs
blob: 437d7eb1db10bdc259aa41927744a6fd7a9bb23a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
using System.IO;
using Microsoft.Xna.Framework.Content.Pipeline;

namespace MonoGame.Extended.Content.Pipeline.Json
{
    [ContentImporter(".json", DefaultProcessor = nameof(JsonContentProcessor), DisplayName = "JSON Importer - MonoGame.Extended")]
    public class JsonContentImporter : ContentImporter<ContentImporterResult<string>>
    {
        public override ContentImporterResult<string> Import(string filename, ContentImporterContext context)
        {
            var json = File.ReadAllText(filename);
            return new ContentImporterResult<string>(filename, json);
        }
    }
}