Author |
Topic |
|
AKazak
Russia
1205 Posts |
Posted - 10/04/2023 : 02:57:59 AM
|
OriginPro 2023b (64-bit) SR1 10.0.5.157 Windows 10 Pro for Workstations 22H2 19045.3086
Greetings!
I have many txt structured files (see an example attached) with the data to imported to Origin for further analysis. What is the best was of parsing this type of files?
Thank you.
https://my.originlab.com/ftp/forum_and_kbase/Images/Sample.txt
--- Andrey |
|
aplotnikov
Germany
165 Posts |
|
YimingChen
1613 Posts |
Posted - 10/04/2023 : 09:18:49 AM
|
The data file doesn't adhere to the standard JSON format, for example, there are missing commas at the end of some long strings. Would it be possible to fix that?
James |
|
|
aplotnikov
Germany
165 Posts |
Posted - 10/04/2023 : 10:56:17 AM
|
It looks like corrupted standard JSON format. But the topic starter can use and modify any available source code for JSON parser to consider possible data errors. The solution consisting in the improvement of the JSON generator seems less time consuming. However, I am not sure, whether it is possible in this particular case. |
|
|
AKazak
Russia
1205 Posts |
Posted - 10/04/2023 : 11:37:51 AM
|
This is not JSON format, but output of a proprietary software. Thus I cannot change the generator...
--- Andrey |
|
|
aplotnikov
Germany
165 Posts |
|
AKazak
Russia
1205 Posts |
Posted - 10/23/2023 : 08:35:03 AM
|
The developer of the software producing the target JSON-like files responded that they use Python stringmap library to generate.
Do you mean that I could use Data Connector Browser to parse these files?
--- Andrey |
|
|
YimingChen
1613 Posts |
Posted - 10/23/2023 : 3:17:25 PM
|
I couldn't find any Python library named stringmap. If it exists, we could explore creating a data connector using Python.
James
quote: Originally posted by AKazak
The developer of the software producing the target JSON-like files responded that they use Python stringmap library to generate.
Do you mean that I could use Data Connector Browser to parse these files?
--- Andrey
|
|
|
AKazak
Russia
1205 Posts |
Posted - 10/26/2023 : 01:31:29 AM
|
quote: Originally posted by YimingChen
I couldn't find any Python library named stringmap. If it exists, we could explore creating a data connector using Python.
James
Dear James,
Please see the library attached. Can you consider making a relevant data connector for this, please? https://my.originlab.com/ftp/forum_and_kbase/Images/stringmap.py.txt
--- Andrey |
|
|
YimingChen
1613 Posts |
|
AKazak
Russia
1205 Posts |
|
AKazak
Russia
1205 Posts |
Posted - 11/02/2023 : 10:01:47 AM
|
Can you share an update to test, please?
--- Andrey |
|
|
snowli
USA
1388 Posts |
Posted - 11/02/2023 : 11:49:48 AM
|
Hi Andrey,
Yiming is on vacation. I will ask some other colleague to take a look.
Thanks, Snow |
|
|
AKazak
Russia
1205 Posts |
Posted - 11/02/2023 : 12:23:26 PM
|
quote: Originally posted by snowli
Hi Andrey,
Yiming is on vacation. I will ask some other colleague to take a look.
Thanks, Snow
Dear Snow,
No worries. I will be waiting until Yiming returns back from his vacation.
--- Andrey |
|
|
Sam Fang
293 Posts |
|
AKazak
Russia
1205 Posts |
Posted - 11/05/2023 : 01:45:40 AM
|
quote: Originally posted by Sam Fang
Hi Andrey,
I updated the app. It can now support file names with "S*.txt" or "*.gdr". You can test it. https://my.originlab.com/ftp/forum_and_kbase/Images/StrMapDC.zip
quote: Originally posted by AKazak
Can you share an update to test, please?
--- Andrey
Thanks.
Sam OriginLab Technical Services
Dear Sam,
I tested the version 2, but it seems still unable to read the whole file.
Can share a link to secured file exchange, so I could share more examples, please?
--- Andrey |
|
|
Sam Fang
293 Posts |
Posted - 11/06/2023 : 02:50:34 AM
|
Hi Andrey,
You can click Send File to Tech support button on the top right of the forum page. And it will show you how to upload large files to our ftp.
quote: Originally posted by AKazak Dear Sam,
I tested the version 2, but it seems still unable to read the whole file.
Can share a link to secured file exchange, so I could share more examples, please?
--- Andrey
Thanks.
Sam OriginLab Technical Services |
|
|
minimax
350 Posts |
Posted - 12/19/2023 : 02:21:02 AM
|
Hi Andrey,
When you have time, you may share us more sample files? |
|
|
AKazak
Russia
1205 Posts |
Posted - 03/06/2024 : 05:15:56 AM
|
quote: Originally posted by minimax
Hi Andrey,
When you have time, you may share us more sample files?
Greetings!
The real name of the format is YAML format (“JSON with comments“).
--- Andrey |
|
|
AKazak
Russia
1205 Posts |
Posted - 09/24/2024 : 03:44:25 AM
|
quote: Originally posted by minimax
Hi Andrey,
When you have time, you may share us more sample files?
Done! Please see "\incoming\GDR 2024-09-24_.zip".
--- Andrey |
Edited by - AKazak on 09/24/2024 03:45:43 AM |
|
|
Sam Fang
293 Posts |
Posted - 10/09/2024 : 09:05:01 AM
|
Hi Andrey,
Thanks for your data files.
I tried your four .gdr files. And all can work well.
Did you fail to import them?
Thanks.
Sam OriginLab Technical Services |
|
|
|
Topic |
|