Skip to content

Add JSON and XML views rendering #46

Description

@EvgeniiaVak

Job story

When having JSON / XML data resource, I want to be able to use datapackage-views-js to render data view, so that I can see it before / instead of downloading.

Acceptance criteria

  • JSON and XML text are rendered with highlighted syntax

Tasks

  • analysis
  • add rendering functionality
  • add test fixtures for cosmos

Analysis

  • We can try to find lightweight libraries (can be limited to only JSON/XML)
  • We shouldn’t do anything time-consuming (like downloading and preping 4MB JSON files to render) in node-js - it'll hinder ux
  • Probably will have to put a limit on files and not render them at all if they are too large even in browser
  • Need to think about consistency with CKAN representation https://github.com/ckan/ckan/tree/master/ckanext/textview

Text spec

datapackage-views-js already has 'document' spec for rendering PDF views, JSON / XML could also have a similar dedicated spec type - text that would:

  • read the content of a file in specified encoding
  • render the text with syntax highlighted according to the file's extention

Rendering libraries

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions