diff --git a/languages/xppJSON.json b/languages/xppJSON.json new file mode 100644 index 0000000..62000ef --- /dev/null +++ b/languages/xppJSON.json @@ -0,0 +1,115 @@ +{ + "modelStart": "\n{", + "reservedKeywords": [ + "abstract", + "as", + "base", + "boolean", + "break", + "byte", + "case", + "catch", + "char", + "checked", + "class", + "const", + "continue", + "real", + "default", + "delegate", + "do", + "double", + "else", + "enum", + "event", + "explicit", + "extern", + "false", + "finally", + "fixed", + "float", + "for", + "foreach", + "goto", + "if", + "implicit", + "in", + "int", + "interface", + "internal", + "is", + "lock", + "long", + "namespace", + "new", + "null", + "object", + "operator", + "out", + "override", + "params", + "private", + "protected", + "public", + "readonly", + "ref", + "return", + "sbyte", + "sealed", + "short", + "sizeof", + "stackalloc", + "static", + "str", + "struct", + "switch", + "this", + "throw", + "true", + "try", + "typeof", + "uint", + "ulong", + "unchecked", + "unsafe", + "ushort", + "using", + "virtual", + "void", + "volatile", + "while" + ], + + "dataTypes": { + "arrayType": "List", + "generic": "object", + "string": "str", + "boolean": "boolean", + "float": "real", + "doubleType": "real", + "characterType": "real", + "longType": "long", + "int": "int" + }, + + "modelDefinition": "\n[DataContract]\npublic class ", + "fileExtension": "cs", + "instanceVarDefinition": "\n\tprivate ;", + "modelEnd": "\n}", + "staticImports": "", + "supportsCamelcasing": false, + "methods": { + "others": { + "getterSetter": { + "name": "DataMembers", + "signature": "", + "bodyStart": "", + "bodyEnd": "", + "codeForEachProperty": "\n\t[DataMember]\n\tpublic ( _ = )\n\t{\n\t\t = _;\n\t\treturn ;\n\t}\n", + "codeForEachArrayProperty": "\n\t[DataMember,\n\t AifCollectionTypeAttribute(\"_\",Types::Class), classstr(putClassName),\n\t AifCollectionTypeAttribute(\"_return\",Types::Class), classstr(putClassName)]\n\tpublic ( _ = )\n\t{\n\t\t = _;\n\t\treturn ;\n\t}", + "checked": "checked" + } + } + }, + "exampleCode": "## Example\n\n\n#### Decoding:\nThe example below shows how to decode an instance of `` type from JSON object.\n\n```csharp\nstring json = \"...\"; // Your JSON String.\n\n model = JsonConvert.DeserializeObject<>(json);\n```\n\n\n#### Encoding: \nThe example below shows how to encode an instance of a simple `` type into a JSON object.\n\n```java\n model = new ();\n// Assign value to variables.\n\nstring json = JsonConvert.SerializeObject(model);\n```" +} \ No newline at end of file diff --git a/script/script.js b/script/script.js index 627ce02..38f2643 100644 --- a/script/script.js +++ b/script/script.js @@ -140,9 +140,19 @@ let languages = { mode: "text/x-csharp", name: "C# Class", file: "CSharpClass.json" + } + } + }, + xpp: { + name: "X++", + frameworks: { + xppClass: { + mode: "text/x-csharp", + name: "X++ Contract Class", + file: "xppJSON.json" + } } } - } }; var selectedLanguage = languages.swift;