Skip to content

JSON to C# and Python #14

@arthur00

Description

@arthur00

Develop a script for writing and reading objects to/from C# using a language agnostic definition (e.g. JSON or XML).

This way, an object can be defined once, and generated automatically on supported languages.
Example:

{ "Name": "Car",
  "attributes": {
    "Position": "Vector3",
    "Name": "String"
   },
   "set": true
}

Would generate:

[Set]
public class Car
{
    [Dimension]
    public String Name { get; set; }

    [Dimension]
    public Vector3 Position { get; set; }
}

and

@Set
class Car(CADIS):
    _Name = None
    @dimension
    def Name(self):
        return self._Name

    @Name.setter
    def Name(self, value):
        self._Name = value

    _Position = Vector3(0,0,0)
    @dimension
    def Position(self):
        return self._Position

    @Position.setter
    def Position(self, value):
        self._Position = value

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions