# Viewing JSON result or Object of ES query?

**URL:** <https://discuss.elastic.co/t/viewing-json-result-or-object-of-es-query/284420>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [September 16, 2021, 3:35pm UTC](https://discuss.elastic.co/t/viewing-json-result-or-object-of-es-query/284420 "2021-09-16T15:35:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bensalerno](https://avatars.discourse-cdn.com/v4/letter/b/9dc877/32.png) [@bensalerno](https://discuss.elastic.co/u/bensalerno)\
**Post date:** [September 16, 2021, 3:35pm UTC](https://discuss.elastic.co/t/viewing-json-result-or-object-of-es-query/284420/1 "2021-09-16T15:35:50Z")

</div>

I apologize if this is a stupid question, newcomer here.

I have a ES cluster that I'm trying to search through and view the result in JSON format. Right now, this is what I'm doing in a very basic example.

```auto
            var settings = new ConnectionSettings(new Uri("http://localhost:9200"))
                .DefaultIndex("people");
            var client = new ElasticClient(settings);
            var person = new Person
            {
                Id = 1,
                FirstName = "Ronald",
                LastName = "Salerno"
            };
            var indexResponse = client.IndexDocument(person);
            var searchResponse = client.Search<Person>(s => s
                .From(0)
                .Query(q => q
                    .Match(m => m
                        .Query("Ronald")
                    )
                )
            );

            var people = searchResponse.Documents;
            Console.WriteLine(people);
        }

```

However, this is returning

```auto
System.Collections.Generic.List`1[es_apitesting.Person]

```

I understand I have to serialize this in some way but I haven't been able to find anything in the documentation that works for me.

How exactly can I view the JSON results or at least the Person object that I'm searching for?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 14, 2021, 3:36pm UTC](https://discuss.elastic.co/t/viewing-json-result-or-object-of-es-query/284420/2 "2021-10-14T15:36:03Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
