Questions tagged [json-view]

85 questions
58
votes
3 answers

Is there any JSON viewer to open large json files (windows)?

I have very large JSON file which is of several GB. I am looking for any efficient JSON viewer. In which we are also able to view JSON in tree format. I understand such huge file can't be loaded in one go. I wonder is there any software to view JSON…
Anwar Shaikh
  • 1,591
  • 3
  • 22
  • 43
45
votes
2 answers

Is there a way to Collapse All json's fields in Postman

I'm working with the chrome-app Postman, and im retriving sometimes long and complex json objects. For an easy work i need to collapse all the json object, but i can't find the option (if there is) in the program, or how to do it. Until now, i'm…
Guiman04
  • 723
  • 1
  • 6
  • 12
35
votes
2 answers

Dynamic Selection Of JsonView in Spring MVC Controller

I am aware that it is possible to annotate controller methods with @JsonView(...) to statically define a single view class in Spring MVC. Unfortunately this means that I need a different endpoint for every type of view I might possibly have. I see…
David
  • 7,652
  • 21
  • 60
  • 98
31
votes
1 answer

How can you disable the new JSON Viewer/Reader in Firefox Developer Edition?

Firefox Developer Edition 44 now has a built in JSON Viewer. It's a nice gesture, but I highly prefer the readability of the third-party JSON viewer I was using. Is there any way to disable, override, or otherwise customize the new built in JSON…
flybayer
  • 342
  • 2
  • 4
  • 9
13
votes
3 answers

Exclude fields in json Using Jackson and Json-View

I am using json-view to create a dynamic json as per my need ,it is a great library ,I am using this library for a while now . Recently I am facing a problem with my one of the Use cases, let me place my code first User class public class User { …
Dev
  • 2,326
  • 24
  • 45
13
votes
3 answers

How to serialize using @Jsonview with nested objects

I have a class which holds a collection of another class. class A{ @JsonView(VerboseViewA.Minimal.class) String field1; @JsonView(VerboseViewA.Complete.class) String field2; @JsonView(VerboseViewA.Complete.class) Collection
kiruba
  • 319
  • 3
  • 12
11
votes
2 answers

@JsonView not filtering properties (Spring 4.1.0.RC2, Jackson 2.3.2)

I have an entity (using lombok) with some annotated @JsonView annotation. @Entity @Table(name = "`order`") @Getter @Setter @ToString @Description("Приказ") public class Order extends Auditable { private static final long serialVersionUID =…
Pavel Varchenko
  • 727
  • 1
  • 11
  • 21
10
votes
1 answer

Generate JSON With JSON-Views

I am trying to use JSON-Views in Grails 3.1. I have the following controller: package myapp BasketController { def index(ProductFilterCommand cmd) { [basketList: service.findAllBaskets()] } } And the following classes: package…
Sergio del Amo
  • 76,835
  • 68
  • 152
  • 179
9
votes
2 answers

jackson: ignore getter, but not with @JsonView

I'm looking for possibility to serialize transient information only in some cases: @JsonInclude(Include.NON_NULL) @Entity public class User { public static interface AdminView {} ... id, email and others ... @Transient private…
Anton Bessonov
  • 9,208
  • 3
  • 35
  • 38
8
votes
3 answers

JsonView returning empty json objects

I am trying to implement a JsonView to selectively serialize fields from an entity but the json that is serialized has empty objects with no fields. Below is my code: ViewClass: public class AuditReportView { public interface Summary…
Jason
  • 220
  • 1
  • 14
5
votes
0 answers

Jackson - Deserialize with JsonView

I am trying to restrict which properties from a JSON object are deserialised using Jackson JSONViews. The aim is to use this to prevent consumers of my API from submitting data that they shouldn't. The problem is, I have either misunderstood…
user2294382
  • 871
  • 3
  • 11
  • 25
5
votes
0 answers

How to dynamically switch the JsonView (Spring MVC/Jackson Mapper)

Please refer to de-ignore Json fields in test cases for the requirement which I am working on. As a solution to de-ignore Json fields in test cases, I am dynamically switching the json view using if else conditions as shown below. import…
Raghavendra
  • 3,876
  • 4
  • 22
  • 41
4
votes
2 answers

Springboot swagger not working with with JsonView

Swagger is suppose to support JsonView but I can't get it to work. Here are my versions: io.springfox springfox-swagger-ui 2.9.2
erotsppa
  • 14,248
  • 33
  • 123
  • 181
4
votes
2 answers

How to change JsonView for specific properties

Hi I have few UI objects that embedded into each other. Example #1: class CarUI { public UserUI user; public UserUI agent; .... public UserUI getUser() { return user; } public UserUI getAgent() { return agent; } } class UserUI…
Andrei V
  • 1,468
  • 3
  • 17
  • 32
4
votes
1 answer

Jackson - how to find active JsonView at runtime

I have UI object that wraps JPA entity and in constructor of that UI object I do lazy loading of some properties. In that same constructor I need to know what JsonView is currently active so I dont lazy load some fields that are not needed if say…
Andrei V
  • 1,468
  • 3
  • 17
  • 32
1
2 3 4 5 6