did somebody have Code to "read" Firefox *.JSON Backup File
use Firefox bookmarks-YYYY-MM-DD.json
Moderator: Rathinagiri
- AUGE_OHR
- Posts: 2117
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
use Firefox bookmarks-YYYY-MM-DD.json
hi,
did somebody have Code to "read" Firefox *.JSON Backup File
did somebody have Code to "read" Firefox *.JSON Backup File
have fun
Jimmy
Jimmy
- danielmaximiliano
- Posts: 2763
- Joined: Fri Apr 09, 2010 4:53 pm
- DBs Used: DBF
- Location: Argentina
- Contact:
Re: use Firefox bookmarks-YYYY-MM-DD.json
Try viewtopic.php?f=15&t=5762&hilit=HBJSON3.0
read
read
Opening JSON Files with Notepad++
Download and install Notepad++.
Open Notepad++, click the Plugins button at the top and select Plugins Admin.
In the Plugins Admin window, search JSON Viewer and install the JSON Viewer plugin.
When prompted, click Yes. Notepad++ will exit and then restart after the plugin has finished installing.
Now, navigate to File > Open or press the CTRL + O buttons and select the JSON file you want to open.
Once the file is opened, go to Plugins > JSON Viewer and select Format JSON. Then again go to Plugins > JSON Viewer and select Show JSON Viewer.
You can now view and edit the contents of the JSON file.
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
Telegram invitation https://t.me/HMGWorkspace
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
Telegram invitation https://t.me/HMGWorkspace
- danielmaximiliano
- Posts: 2763
- Joined: Fri Apr 09, 2010 4:53 pm
- DBs Used: DBF
- Location: Argentina
- Contact:
Re: use Firefox bookmarks-YYYY-MM-DD.json
in firefox menu file, OPEN, SEARCH THE json file and look at its structure
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
Telegram invitation https://t.me/HMGWorkspace
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
Telegram invitation https://t.me/HMGWorkspace
- Rathinagiri
- Posts: 5482
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: use Firefox bookmarks-YYYY-MM-DD.json
If you want to read it from HMG, use SQLite library!
Yes! SQLite can convert JSON to tables!
Yes! SQLite can convert JSON to tables!
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
- AUGE_OHR
- Posts: 2117
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: use Firefox bookmarks-YYYY-MM-DD.json
hi,
while Daniel "remind" me that JSON have a "Format-Structure" i user FileIO and search for "Delimiter"
each "Row" start with
and "End" with
as i only need URI and Description i search for
now i got it so far and wanted to transfer it to DBF ... but how LEN ...

Yes i have "think" about "read" SQlite Table "direct" ... but it need to "learn" how it work under HMGRathinagiri wrote: ↑Sat Aug 21, 2021 4:34 am If you want to read it from HMG, use SQLite library!
Yes! SQLite can convert JSON to tables!
while Daniel "remind" me that JSON have a "Format-Structure" i user FileIO and search for "Delimiter"
each "Row" start with
Code: Select all
cSeek := "{"+CHR(34)+"guid"+CHR(34)+":"Code: Select all
nEnde := hb_AT( "}", cBuffer , nPosi)Code: Select all
cSeek := CHR(34)+"uri"+CHR(34)+":"so URI will not fit into Type "C", ornMaxTXT : 142
nMaxURI : 650
have fun
Jimmy
Jimmy
Re: use Firefox bookmarks-YYYY-MM-DD.json
character field maybe longer than 255 character, is it problem?
Re: use Firefox bookmarks-YYYY-MM-DD.json
hello see if it helps
Code: Select all
#include "hbclass.ch"
/*
Clase que define los methods que seran necesarios sobrecargar
para darle funcionalidad */
CLASS BaseService
// La data uValue inicialmente es un array. Lo he dejado de esta manera
// pensando más en devolver una lista que un objeto JSON.
DATA uValue
DATA lError INIT .F.
METHOD New() CONSTRUCTOR
METHOD getError() INLINE ::lError
METHOD GetJSON()
METHOD getBydId()
METHOD findAll()
METHOD DeleteBydId()
METHOD Create()
METHOD Modify()
END CLASS
METHOD New() CLASS BaseService
::uValue := {}
RETURN Self
/*
Por defecto, los methods , si no estan sobreescritos, el valor de retorno
dará un error 501 Not Implemented
*/
METHOD getBydId() CLASS BaseService
RETURN ( ::lError := .T., USetStatusCode( 501 ) )
METHOD findAll() CLASS BaseService
RETURN ( ::lError := .T., USetStatusCode( 501 ) )
METHOD DeleteBydId() CLASS BaseService
RETURN ( ::lError := .T., USetStatusCode( 501 ) )
METHOD Create() CLASS BaseService
RETURN ( ::lError := .T., USetStatusCode( 501 ) )
METHOD Modify() CLASS BaseService
RETURN ( ::lError := .T., USetStatusCode( 501 ) )
METHOD GetJSON() CLASS BaseService
RETURN if( ::uValue != NIL, hb_jsonEncode( ::uValue, .T. ), NIL )