Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 115 additions & 0 deletions languages/xppJSON.json
Original file line number Diff line number Diff line change
@@ -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 <!ModelName!> ",
"fileExtension": "cs",
"instanceVarDefinition": "\n\tprivate <!VarType!> <!VarName!>;",
"modelEnd": "\n}",
"staticImports": "",
"supportsCamelcasing": false,
"methods": {
"others": {
"getterSetter": {
"name": "DataMembers",
"signature": "",
"bodyStart": "",
"bodyEnd": "",
"codeForEachProperty": "\n\t[DataMember]\n\tpublic <!VarType!> <!CapitalizedVarName!>(<!VarType!> _<!VarName!> = <!VarName!>)\n\t{\n\t\t<!VarName!> = _<!VarName!>;\n\t\treturn <!VarName!>;\n\t}\n",
"codeForEachArrayProperty": "\n\t[DataMember,\n\t AifCollectionTypeAttribute(\"_<!VarName!>\",Types::Class), classstr(putClassName),\n\t AifCollectionTypeAttribute(\"_return\",Types::Class), classstr(putClassName)]\n\tpublic <!VarType!> <!CapitalizedVarName!>(<!VarType!> _<!VarName!> = <!VarName!>)\n\t{\n\t\t<!VarName!> = _<!VarName!>;\n\t\treturn <!VarName!>;\n\t}",
"checked": "checked"
}
}
},
"exampleCode": "## Example\n\n\n#### Decoding:\nThe example below shows how to decode an instance of `<!RootClassName>` type from JSON object.\n\n```csharp\nstring json = \"...\"; // Your JSON String.\n\n<!RootClassName> model = JsonConvert.DeserializeObject<<!RootClassName>>(json);\n```\n\n\n#### Encoding: \nThe example below shows how to encode an instance of a simple `<!RootClassName>` type into a JSON object.\n\n```java\n<!RootClassName> model = new <!RootClassName>();\n// Assign value to variables.\n\nstring json = JsonConvert.SerializeObject(model);\n```"
}
12 changes: 11 additions & 1 deletion script/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down