Jump to content

Please read the Forum Rules before posting.

Photo
- - - - -

JSON file format

Public Domain Biblical Studies Modern (1800-Today)

  • Please log in to reply
11 replies to this topic

#1 solmnjms1

solmnjms1

    New to Bible Support

  • Members
  • Pip
  • 8 posts
Offline

Posted 07 August 2020 - 06:02 PM

Hello,
 
I'm both an e-Sword and theWord user, and am wondering about the json file format.
 
There is a great json resource of a Bible with cross-references (long out of copyright):
the "Self-Interpreting Bible" by John Brown of Haddington,
which is also titled as the "Westminster Reference Bible" by the json author.
 
(I tried posting the links, yet the message was deemed to be spam.)
 
Is it possible to convert the json file into a theWord friendly format, as a commentary or even as a book?
 
Simple Bible Reader 3 does not seem to be of any help with this.
And I've only come across someone suggesting a Python script (I'm already lost by now) for converting json to sqlite, yet that is for individual json Bibles, and I have no idea how it would handle or mangle the cross-references within it.
I've tried the beast known as ToolTip before, and would be willing to try that again if applicable.

 



#2 Tj Higgins

Tj Higgins

    e-Sword Fanatic

  • Members
  • PipPipPipPipPip
  • 757 posts
Offline

Posted 07 August 2020 - 07:22 PM

 

Hello,
 
I'm both an e-Sword and theWord user, and am wondering about the json file format.
 
There is a great json resource of a Bible with cross-references (long out of copyright):
the "Self-Interpreting Bible" by John Brown of Haddington,
which is also titled as the "Westminster Reference Bible" by the json author.
 
(I tried posting the links, yet the message was deemed to be spam.)
 
Is it possible to convert the json file into a theWord friendly format, as a commentary or even as a book?
 
Simple Bible Reader 3 does not seem to be of any help with this.
And I've only come across someone suggesting a Python script (I'm already lost by now) for converting json to sqlite, yet that is for individual json Bibles, and I have no idea how it would handle or mangle the cross-references within it.
I've tried the beast known as ToolTip before, and would be willing to try that again if applicable.

 

It would help to have the link in order to examine the file itself, a possible solution would be to convert the json file to xml which can be read by Simple Bible Reader 



#3 solmnjms1

solmnjms1

    New to Bible Support

  • Members
  • Pip
  • 8 posts
Offline

Posted 08 August 2020 - 09:35 AM

Here is the link to the json file:

https://github.com/h...ree/master/data

 

(I tried posting before, yet the board wouldn't let me post it.)



#4 solmnjms1

solmnjms1

    New to Bible Support

  • Members
  • Pip
  • 8 posts
Offline

Posted 08 August 2020 - 09:47 AM

It would help to have the link in order to examine the file itself, a possible solution would be to convert the json file to xml which can be read by Simple Bible Reader 

 

How would the json to xml work?

I've tried notepad++ to convert to xml, yet that didn't seem to work despite being able to view the json correctly.

The error message in SBR is:

 

System.Xml.XmlException: Data at the root level is invalid. Line 1, position 1.

  at System.Xml.XmlTextReaderImpl.Throw(Exception e)

  at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)

  at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()

  at System.Xml.XmlTextReaderImpl.ParseDocumentContent()

  at System.Xml.XmlTextReaderImpl.Read()

  at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader, Boolean preserveWhitespace)

  at System.Xml.XmlDocument.Load(XmlReader reader)

  at System.Xml.XmlDocument.Load(String filename)

  at Simple_Bible_Reader.XMLBookFormat.Load()

 



#5 solmnjms1

solmnjms1

    New to Bible Support

  • Members
  • Pip
  • 8 posts
Offline

Posted 08 August 2020 - 09:54 AM

Also, the main window of SBR displays:

 

No Book details found!

 

Error displaying 'C:\Users\...\...\bible.xml'

 

Message: Object reference not set to an instance of an object.

 

StackFrame:

 

getChapterHtml at offset 55 in file :line:colum :0:0

BackgroundWorker1_RunWorkerCompleted at offset 1904 in file:line:column :0:0


Edited by solmnjms1, 08 August 2020 - 09:55 AM.


#6 Tj Higgins

Tj Higgins

    e-Sword Fanatic

  • Members
  • PipPipPipPipPip
  • 757 posts
Offline

Posted 08 August 2020 - 11:02 AM

How would the json to xml work?

I've tried notepad++ to convert to xml, yet that didn't seem to work despite being able to view the json correctly.

The error message in SBR is:

 

System.Xml.XmlException: Data at the root level is invalid. Line 1, position 1.

  at System.Xml.XmlTextReaderImpl.Throw(Exception e)

  at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)

  at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()

  at System.Xml.XmlTextReaderImpl.ParseDocumentContent()

  at System.Xml.XmlTextReaderImpl.Read()

  at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader, Boolean preserveWhitespace)

  at System.Xml.XmlDocument.Load(XmlReader reader)

  at System.Xml.XmlDocument.Load(String filename)

  at Simple_Bible_Reader.XMLBookFormat.Load()

There are online converters that will convert the enitre file from json to xml with a couple of mouse clicks. However after I posted last night I downloaded the json file and it is too small to be the full bible with all of the cross references. The json file is only 75 kilobytes in size which means it only holds a small amount of data.  

UPDATE: I located a the full file which is 57 megabytes in size this is too big for most online json to xml converters unfortunately. 


Edited by Tj Higgins, 08 August 2020 - 11:34 AM.


#7 solmnjms1

solmnjms1

    New to Bible Support

  • Members
  • Pip
  • 8 posts
Offline

Posted 08 August 2020 - 12:47 PM

Right, I keep on running into those online converters... of who knows what origin.

And of course, the 57mb file size.

 

To simplify things: here's a direct link to the json file itself, instead of only the Github page:

https://github.com/h...data/bible.json

 

The author of the json file has this file implemented here, for those curious:

https://reformedstandards.com/bible



#8 Tj Higgins

Tj Higgins

    e-Sword Fanatic

  • Members
  • PipPipPipPipPip
  • 757 posts
Offline

Posted 08 August 2020 - 12:53 PM

Right, I keep on running into those online converters... of who knows what origin.

And of course, the 57mb file size.

 

To simplify things: here's a direct link to the json file itself, instead of only the Github page:

https://github.com/h...data/bible.json

 

The author of the json file has this file implemented here, for those curious:

https://reformedstandards.com/bible

I was successfully able to convert the json to xml but it cannot be read by Simple Bible Reader due to not having the correct data set up 



#9 solmnjms1

solmnjms1

    New to Bible Support

  • Members
  • Pip
  • 8 posts
Offline

Posted 08 August 2020 - 05:39 PM

Thanks for your help anyway Tj Higgins.



#10 solmnjms1

solmnjms1

    New to Bible Support

  • Members
  • Pip
  • 8 posts
Offline

Posted 08 August 2020 - 06:05 PM

After using Notepad++ to compare e-Sword Bible/commentary module XML exports, I realize I am in way over my head.

(I'm sure it's obvious to others that it is something like two entirely different languages, with JSON code being able to be shoved into an XML container file, without even being compatible with XML formatting.)







Also tagged with one or more of these keywords: Public Domain, Biblical Studies, Modern (1800-Today)

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users




Similar Topics



Latest Blogs