9

Input JSON:

{
  "some_field":"some value"
}

Type to be used for mapping:

export inteface SomeType {
  someField:string;
}

How can the mapping between JSON and TypeScript type be configured so that some_field -> someField?

1 Answer 1

2

You could use decorators to do that . see this post for more details Type Script Decorators

Sign up to request clarification or add additional context in comments.

1 Comment

It doesn't solve the problem entirely, but it's a good starting point.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.