using Raumgleiter.BaseRGDK.JSON; using System.Collections; using System.Collections.Generic; using UnityEngine; public class MtexMaterial { public int id { get; set; } public string name { get; set; } public object info { get; set; } public string archive_url_ref { get; set; } public string created_at { get; set; } public string updated_at { get; set; } public string materialcode { get; set; } public object materialgewicht { get; set; } public string materialgewicht_unit { get; set; } public string warmeleitfahigkeit { get; set; } public string uwert { get; set; } public string brandkennziffer { get; set; } public object max_lange_l { get; set; } public object max_lange_b { get; set; } public object max_lange_d { get; set; } public object min_lange_l { get; set; } public object min_lange_b { get; set; } public object min_lange_d { get; set; } public string kennwerte_info { get; set; } public Color color { get; set; } public string type { get; set; } public string subtype { get; set; } public List purposes { get; set; } public List subpurposes { get; set; } public string manufacturer { get; set; } public string product_line { get; set; } public string image { get; set; } public string pdf { get; set; } public static List JsonMatToClass(string jsonLikeString) { var json = JSONNode.Parse(jsonLikeString); var material = new List(); for (int i = 0; i < (json.Count); i++) { material.Add(new MtexMaterial { id = json[i]["id"], name = json[i]["name"], }); } return material; } }