Sha256: 8d406e9a636a5c7f8c2ed183ba5d8f04f88b0fb3900fc4e5f7dd80cac9170116
Contents?: true
Size: 751 Bytes
Versions: 86
Compression:
Stored size: 751 Bytes
Contents
using System.ComponentModel.DataAnnotations; using Newtonsoft.Json; namespace Generators.Input { public class CanonicalDataParser { private readonly CanonicalDataFile _canonicalDataFile; public CanonicalDataParser(CanonicalDataFile canonicalDataFile) { _canonicalDataFile = canonicalDataFile; } public CanonicalData Parse(string exercise) { var canonicalDataJson = _canonicalDataFile.Contents(exercise); var canonicalData = JsonConvert.DeserializeObject<CanonicalData>(canonicalDataJson); Validator.ValidateObject(canonicalData, new ValidationContext(canonicalData)); return canonicalData; } } }
Version data entries
86 entries across 86 versions & 1 rubygems