0

I have json responce

"storeId": 1,
   "name": "Тестовый магазин",
   "address": "1й волоколамский проезд д.10",
   "productIdList":    [
            {
         "productId": 1,
         "productName": "Zewa Deluxe Camomile Comfort",
         "price": 21.3,
      },
            {
         "productId": 2,
         "productName": "Аленка. Молочный шоколад(Крвсный Октябрь)",
         "price": 55,
      },
            {
         "productId": 3,
         "productName": "Safeguard. Пенка для детей.",
         "price": 97.5,
      }
   ]
}

My headers is

Transfer-Encoding   chunked
#status#    HTTP/1.1 200 OK
Server  Jetty(6.1.25)
Content-Type    application/json; charset=utf-8

Charset I declare in my REST annotation:

@Produces("application/json;charset=utf-8")

How can I fix the problem with this character encoding?

java_user
  • 929
  • 4
  • 16
  • 39

1 Answers1

1

The problem was in compile encoding, by default Gradle set platform encoding(in my case Windows)

Setting compileJava.options.encoding = 'UTF-8' to my build.gradle fix the problem

java_user
  • 929
  • 4
  • 16
  • 39