How to create a basic REST service

Six Stars

How to create a basic REST service

I would like to create a basic rest service. At first I would like this service to validate the JSON that comes in. How do I do that?

First component would probably be tRestResponse what about after that?

Employee

Re: How to create a basic REST service

Use a tJava or tJavaRow and load a Java JSON Schema Validator library. Something like that https://github.com/java-json-tools/json-schema-validator/blob/master/src/main/java/com/github/fge/js...

 

Another way with limitations:  Talend Document object type can translate the JSON to XML if it is in a supported format in XML, and then use tXSDValidator.  However, if your JSON is very complex, with arrays, nodes with digits only, etc, you will need to use a library like above.

Six Stars

Re: How to create a basic REST service

I thought I can use standard components. I don't really want to Validate JSON against a schema but just to validate that it is a valid JSON.

Five Stars

Re: How to create a basic REST service

I need to validate json payload against json schema, can you please guide me how to do it with tjava and how to add the library. Thanks.

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

An API-First Approach to Modernizing Applications

Learn how to use an API-First Approach to Modernize your Applications

Watch Now

Talend API Designer – Technical Overview

Take a look at this technical overview video of Talend API Designer

Watch Now

Getting Started with APIs

Find out how to get started with APIs

Read