Skip to content
Advertisement

Specifying sort order direction in a JSON API

Does Restful API define proper ways to give Sort Order Direction, (Ascending or Descending) for API user parameters ? I am letting a user input a request string, that only allows two options for API to work “Ascending” or “Descending” . Is there a more formal way of doing this per standards? Request: Specifying sort order in a JSON API

How to make this kind of button? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 4 months ago. Improve this question I am creating a currency converter and I want to create a button that switches or swaps values. I appreciate the support. enter image description

ERROR: org.codehaus.jackson.map.JsonMappingException

I’m using lombok + Java to otimizate the application. The class has the tags @Data , @EqualsAndHashCode(callSuper = false), @NoArgsConstructor, @AllArgsConstructor e @Builder before signature’s class. When I run, It shows the error below: ERROR: org.apache.cxf.jaxrs.JAXRSRuntimeException: org.codehaus.jackson.map.JsonMappingException: No suitable constructor found for type [simple type, class java.time.LocalDateTime]: can not instantiate from JSON object (need to add/enable type information?) at [Source:

Using exception for invalid entry

I am trying to use exceptions in my assignment to catch an error when a user input invalid entry. I tried using the if else statement to catch but whenever running the program it will skipped pass my exception even when I input invalid entry. Do any of you have any idea where I am wrong in the code? PS:

Advertisement