question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to get whole document?

See original GitHub issue

Is there a way to retrieve a whole document, not just some of it’s properties or collections?

For a json file from a docs’ sample:

{
  "selected_user": { "id": 1, "name": "Phil", "age": 40, "city": "NY" },
  "temperature": 23.45,
  "note": "this is a test"
}

How could one retrieve it a as a whole into an instance of a class?

public class Settings
{
    public User SelectedUser { get; set; }
    public double Temperature { get; set; }
    public string Note { get; set; }
}

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
ttucommented, Aug 13, 2018

Thanks for the input and yes, you are correct.

First I was thinking also GetRoot-method, but because of lack of time, thought that adding functionality to GetItem would have been the fastest way to implement this. As you pointed out, it wouldn’t have even worked that way.

Have to think this littlebit more, but maybe GetRoot has to return Root-object that can either have a DocumentCollection or a single item.

1reaction
AbdulmueezEmiolacommented, Aug 28, 2020

Hello, I saw this issue opened and I was wondering whether It has been fixed. If not, I will like to attempt to provide a solution to it

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to get the entire document HTML as a string?
Get the root <html> element with document.documentElement then get its .innerHTML : const txt = document.documentElement.
Read more >
How to get the entire HTML document as a string in ...
Example: This example gets the whole document by first selecting the elements with the tag name 'HTML' and selecting the first element by ......
Read more >
How to Select the Entire Document [Tutorial] - YouTube
How to Select the Entire Document [Tutorial] In Word, you can select all text in a document (Ctrl+A), or select specific text or...
Read more >
How to get the entire document HTML as a string in ...
Considering the following example, it gets the whole document by first selecting element with tagname “HTML” and selecting the first element by ...
Read more >
Get the whole document from an add-in for Word
This article demonstrates how to build a simple task pane add-in for PowerPoint or Word that gets all of the presentation or document...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found