How to get whole document?
See original GitHub issueIs 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:
- Created 5 years ago
- Comments:8 (4 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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 toGetItem
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 returnRoot
-object that can either have aDocumentCollection
or a single item.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