Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could we avoid parsing the incoming data without the real need? #16

Closed
blokhin opened this issue Oct 12, 2022 · 3 comments
Closed

Could we avoid parsing the incoming data without the real need? #16

blokhin opened this issue Oct 12, 2022 · 3 comments

Comments

@blokhin
Copy link
Member

blokhin commented Oct 12, 2022

target_data = JSON.parse(event.data); // do we receive a JSON-object or a JSON-string?

@blokhin
Copy link
Member Author

blokhin commented Dec 9, 2023

@stan-donarise @nin-jin please could you have a look?

@nin-jin
Copy link
Contributor

nin-jin commented Dec 13, 2023

А кто посылает это сообщение? Тут по хорошему надо поменять формат сообщений, так как сообщения могут приходить самые разные от разных источников и их надо как-то отличать.

@stan-donarise
Copy link
Contributor

Now matinfo gets 2 args:
data - can be either a string or an object.
format - can be omitted, then it will be auto-detected.
https://github.com/stan-donarise/cifplayer/blob/mol/matinfio/matinfio.web.ts#L89

So if the format is an OPTIMADE object, there is no redudant stringify/parse.

@blokhin blokhin closed this as completed Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants