Question on the ps1 files

Sep 22, 2009 at 4:52 PM

I'm pretty new to Powershell, but I'm gonna ask anyway: the ConvertFrom file declares itself a function, while the ConvertTo file declares itself a filter. Why are they not both filters or functions?

Sep 22, 2009 at 8:43 PM

Great question. I wrote the two many months apart.

My need for ConvertFrom did not require me to pipe data into it.

When I built ConvertTo it was more natural to pipe the data so I used Filter.




Sep 22, 2009 at 9:57 PM

Thanks for the quick reply.

By the way, I downloaded the source files and made a small app to test if I still know how C# works :P


Insert JSON left, get Powershell right. Pretty fun.

Sep 22, 2009 at 10:09 PM

Nice. Are you hosting PowerShell in the Winform app?

Sep 22, 2009 at 11:03 PM
Edited Sep 22, 2009 at 11:04 PM

Sadly not, what you see are 2 textarea's.

Enter JSON on the left, hit transform and the Powershell code shows up on the right.

I made this up real quick with VS2008.


Hosting Powershell inside the winform? To be honest, I would have never even considered such a thing to be possible.

Sep 23, 2009 at 12:24 AM


Sep 23, 2009 at 12:47 AM

That site is now in my Google Reader. Awesome stuff.


TBH, never worked with WPF before. When I said "to see if I still know how C# works", I meant that it's been summer vacation. Back to college now :P