- No suggested jump to results
- Notifications

Name already in use
Capstone-project-2 / rajesh_more_team1_capstone_project_2.ipynb.
- Go to file T
- Go to line L
- Copy permalink
- Open with Desktop
- Delete file
- Stack Overflow Public questions & answers
- Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers
- Talent Build your employer brand
- Advertising Reach developers & technologists worldwide
- About the company
Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
How to read JSON in Spring Boot? - JSON parse error: Cannot deserialize value of type `X` from Array value (token `JsonToken.START_ARRAY`);
I am sending data from an Angular application to SpringBoot. The application creates an order and sends it to the server. My problem is that the server does not receive the correct object.
I console.log the output to be sent to the server, and looks alright:
The methods I use in Angular are
- createOrder() to create the order out of client, cart, and status
- onSubmit() to send the data.
On SpringBoot, trying to use @RequestBody or @ModelAttribute:
When I use @RequestBody, the server responds with
and when I use @ModelAttribute, I got:
I searched all over the Internet twice... but couldn't get what the problem is. I am new to Springboot and Angular... which might be the start of the trouble. I would appreciate if you can please shed some light on this...
- spring-boot

It look like you are mixing things:
Controller: Your contrller looks fine with @RequestBody this way you expecting a post request from the Angular.
Your angular request on the other hand look odd it should be something like this:
The order is an Angular object defined on its own .ts file.
Before calling the service build the object:
- Thank you for your answer. I tried adding the httpOptions and wrapping the order object with JSON.stringify, but still getting the same error: Resolved [org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Cannot deserialize value of type com.slbootcamp.foodbox.entity.Cart from Array value (token JsonToken.START_ARRAY ); – Gianni Fontanot Oct 1, 2022 at 2:35
- You need to isolate the problem, it's must be mapping issue, try removing the cart from both Angular and Spring and then step by them identify the propery which failed to parsed. Then you will be able to create a new more specific question if you can't resolve it. – user2304483 Oct 1, 2022 at 3:57
- Well, I've been trying to solve this issue since days ago. I know that there is something with the way that CART is built and passed in the order. Looks like Angular does not like an array inside a JSON. If you want to take a look at the full code, the repo is github.com/giannifontanot/sl-capstone-foodbox I need to find out why the order cannot contain a cart inside with an array. – Gianni Fontanot Oct 1, 2022 at 11:12

Your Answer
Sign up or log in, post as a guest.
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service , privacy policy and cookie policy
Not the answer you're looking for? Browse other questions tagged json angular spring-boot jackson or ask your own question .
- The Overflow Blog
- The nature of simulating nature: A Q&A with IBM Quantum researcher Dr. Jamie...
- Five Stack Exchange sites turned ten years-old this quarter!
- Featured on Meta
- We've added a "Necessary cookies only" option to the cookie consent popup
- Launching the CI/CD and R Collectives and community editing features for...
- The [amazon] tag is being burninated
- Temporary policy: ChatGPT is banned
- Staging Ground Beta 1 Recap, and Reviewers needed for Beta 2
Hot Network Questions
- How can I solve a three-dimensional Gross-Pitaevskii equation?
- Tanks, weapons, equipments and armor for super soldiers
- Pixel 5 vibrates once when turned face down
- Separating layers based on labels
- How to sample a complex function?
- Does Hooke's Law apply to all springs?
- What are the Stargate dial home device symbols used to dial Earth from Atlantis?
- Should I put my dog down to help the homeless?
- Earn CC flight miles by paying rent?
- Quotients of number fields by certain prime powers
- Resistance depending on voltage - the chicken and the egg?
- Refactoring duplicate validation by array column wise
- Max-heap implementation in C
- NoData masks in QGIS
- What is the name of the color used by the SBB (Swiss Federal Railway) in the 1920s to paint their locomotive?
- Why are aluminum frames painted at all?
- Forced to pay a customs fee for importing a used wedding dress into the Netherlands. Is there a way to avoid paying?
- Why did Ukraine abstain from the UNHRC vote on China?
- Google maps for Space exploration
- What is "ぷれせんとふぉーゆーさん" exactly referring to?
- Does single case chance actually exist?
- How do you ensure that a red herring doesn't violate Chekhov's gun?
- Disconnect between goals and daily tasks...Is it me, or the industry?
- Why did Windows 3.0 fail in Japan?
Your privacy
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy .

IMAGES
VIDEO
COMMENTS
to connect to the database use localhost:54320 username:foodbox
FoodBox-Capstone-Project Public. FoodBox is an online food delivery web application for ordering food items of different cuisines from a restaurant.
This is the FoodBox project. A proof of concept project similar to Loot Boxes in games, but for order food. Created with the solely purpose of
Capstone Project: Starter Code for Front-end using ReactJS - GitHub - upgrad-edu/food-ordering-app: Capstone Project: Starter Code for Front-end using
The project is divided into two main folders namely: /backend for all the backend related code; /fronend for all the frontend related code
Repository created for Simplilearn projects associated with the Full Stack Java Masters Program 2H2022 - GitHub - niakelleyjester/simplilearn-projects:
GitHub is where people build software. More than 100 million people use GitHub to discover, fork, and contribute to over 330 million projects.
Corona Virus Sentiment Analysis.This challenge asks you to build a classification model to predict the sentiment of COVID-19 tweets.
GitHub Repo, /giannifontanot/sl-capstone-foodbox. F o o d B O X. Java Full Stack Bootcamp Gianni Fontanot - Angular. Welcome! Login to FoodBox! Username:.
FoodBox- Online Food Delivery Application. Aug 2022 - Sep 2022.
If you want to take a look at the full code, the repo is github.com/giannifontanot/sl-capstone-foodbox I need to find out why the order