0

I am a single, amateur developer and I am currently learning on a server (Golang) and client (TypeScript, Vue) application.

The client calls the server through a REST-like interface and exchanges a JSON structure with some information.

As my program changes, I need to keep two copies of the structure, one in Golang on the server, and one in TypeScript on the client - and not forget to change one when the other changes because of a vision of mine when working on some of the components.

Is there a standard way to solve this problem?

1
  • 1
    One standard solution is to have a schema, and then you can auto-generate classes to represent that schema in the different languages. Here's how I'd do it in C# stackoverflow.com/questions/6358745/…
    – pjc50
    Feb 24 at 15:57

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.