mirror of
https://github.com/AlexMacocian/MonoGame.Extended.git
synced 2026-09-24 01:04:58 +00:00
16 lines
603 B
C#
16 lines
603 B
C#
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);
|
|
}
|
|
}
|
|
}
|