Search Results for

    Show / Hide Table of Contents

    Class ScrapedData

    A flexible dictionary of object values used to conveniently store scraped data of any Type in a key-value dictionary which can be saved as JSON using the Yield method. ScrapedData can hold data objects of any Type, including Classes.

    E.g:
    var Data = new ScrapedData();
    Data['title'] = "Page Title";
    Data['date'] = DateTime.Now;
    Inheritance
    System.Object
    ScrapedData
    Namespace: IronWebScraper
    Assembly: IronWebScraper.dll
    Syntax
    public class ScrapedData : Dictionary<string, object>

    Constructors

    ScrapedData()

    Declaration
    public ScrapedData()

    Methods

    FromJson(String)

    Deserializes a ScrapedData object from JSON created using the toJson() method.

    Declaration
    public static ScrapedData FromJson(string json)
    Parameters
    Type Name Description
    System.String json
    Returns
    Type Description
    ScrapedData

    Get<T>(String)

    Returns the specified ScrapedData item cast as the appropriate type.

    E.g:
    Get<string>("url");
    Declaration
    public T Get<T>(string key)
    Parameters
    Type Name Description
    System.String key

    Key

    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    Type

    Exceptions
    Type Condition
    System.Collections.Generic.KeyNotFoundException

    ToJson()

    Converts the ScrapedData to a JSON string.

    Declaration
    public string ToJson()
    Returns
    Type Description
    System.String
    ☀
    ☾
    Downloads
    • Download with Nuget
    • Start for Free
    In This Article
    Back to top
    Install with Nuget
    Want to deploy IronWebscraper to a live project for FREE?
    What’s included?
    30 days of fully-functional product
    Test and share in a live environment
    No watermarks in production
    Get your free 30-day Trial Key instantly.
    No credit card or account creation required
    Your Trial License Key has been emailed to you.
    Download IronWebscraper free to apply
    your Trial Licenses Key
    Install with NuGet View Licenses
    Licenses from $499. Have a question? Get in touch.