Skip to content

Вырезание комментариев в тексте перед чтением JSON #4

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

Merged
merged 1 commit into from
Nov 10, 2017
Merged

Conversation

Stepa86
Copy link
Contributor

@Stepa86 Stepa86 commented May 16, 2017

Так как наличие комментариев крашит разбор json, сделал вырезку обычных и блочных комментариев перед передачей текста парсеру. У тестов зеленая полоса.

@khorevaa
Copy link
Member

up. Нужный PR

@@ -344,22 +344,40 @@
СхемаПодстановок,
(АвтоматическиПриводитьКСтруктуре = Истина));

ЗначениеБезКомментариев = ВырезатьКомментарии( Значение );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Можно, но это полностью отменяет текущий PR и требует более сложного и менее понятного изменения в теле парсера, на такое я пока не готов.

@artbear artbear merged commit 88bfdc3 into oscript-library:develop Nov 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants