do not print to stdout when STREAM=0#11
Conversation
|
All done in commit 4089faf. Please let me know if you have any concerns. Thank you. |
|
Thank you for explanations and documentation update. Indeed I misunderstood the purpose of function Embedding JSON.awk with PS. I think you still have a different default STREAM value between the code (STREAM=1) and the FAQ (STREAM=0). |
|
Thank you for you comments. You're right about providing some mechanism to embed JSON.awk as is without needing to modify |
|
You're right, |
|
Yes, maybe, in this order Just some thoughts now. A user is required to call awk with |
|
So, what about adding a test in your apply function ? It would allow me to pass through the apply function and play with the JPATHS array in my custom script instead. |
|
I think it would need to call if(0 == STREAM) {
apply(JPATHS, NJPATHS)
}Since |
|
Yes, sure ! That's what I'm trying to do in this PR, calling apply only when (1 == STREAM). |
So you want for JSON.awk to output the JSON paths (STREAM=1) and to fill JPATHS so your redefined apply function can also process JPATHS?
I will not define an |
|
No, I want JSON.awk to not output the JSON when STREAM=0. |
That is what will happen.
With the enhancement that I described there will be no |
|
perfect for me :) |
Correct. I see no purpose in calling JSON.awk with STREAM=0 and no apply function because when STREAM=0 JSON.awk per se outputs nothing, and no function is processing jpaths. Anyway, I have pushed branch issue-12 which implements and documents the new interface. Function Please take a look and let me know what you think of it. Thank you. |
|
@aya did you see my comment? If you don't have time right now, that's OK, but let me know you've seen it, please. |
|
I tested your new branch. |

No description provided.