Skip to content

Commit 5dd61c4

Browse files
authored
Merge pull request #9 from queryverse/new-mime
Add support for 'application/vnd.dataresource+json' MIME type
2 parents 77b6950 + 841dae8 commit 5dd61c4

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

NEWS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# StatFiles.jl v0.8.0
2+
* Add support for "application/vnd.dataresource+json" MIME type
3+
14
# StatFiles.jl v0.7.0
25
* Export FileIO.File and FileIO.@format_str
36

src/StatFiles.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ end
3030

3131
Base.Multimedia.showable(::MIME"text/html", source::StatFile) = true
3232

33+
function Base.show(io::IO, ::MIME"application/vnd.dataresource+json", source::StatFile)
34+
TableShowUtils.printdataresource(io, getiterator(source))
35+
end
36+
37+
Base.Multimedia.showable(::MIME"application/vnd.dataresource+json", source::StatFile) = true
38+
3339
function fileio_load(f::FileIO.File{FileIO.format"Stata"})
3440
return StatFile(f.filename)
3541
end

0 commit comments

Comments
 (0)