<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>caliberweb.com &#187; reflection</title>
	<atom:link href="http://chris.caliberweb.com/tags/reflection/feed/" rel="self" type="application/rss+xml" />
	<link>http://chris.caliberweb.com</link>
	<description></description>
	<lastBuildDate>Mon, 01 Jun 2009 22:35:33 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Javascript Reflection</title>
		<link>http://chris.caliberweb.com/2009/02/22/javascript-reflection/</link>
		<comments>http://chris.caliberweb.com/2009/02/22/javascript-reflection/#comments</comments>
		<pubDate>Sun, 22 Feb 2009 21:20:59 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[reflection]]></category>

		<guid isPermaLink="false">http://chris.caliberweb.com/?p=41</guid>
		<description><![CDATA[I&#8217;m not happy with the json.js script from http://json.org so I&#8217;m going to write my own.
For future reference, I&#8217;m posting the start of my object reflection class.

if(typeof Caliberweb == &#039;undefined&#039;) var Caliberweb = {};
(function(){
    if(typeof Caliberweb.Reflection == &#039;undefined&#039;) {
        Caliberweb.Reflection = {
    [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m not happy with the json.js script from http://json.org<del datetime="2009-02-22T22:31:28+00:00"> so I&#8217;m going to write my own.</del></p>
<p>For future reference, I&#8217;m posting the start of my object reflection class.</p>
<pre class="brush: jscript">
if(typeof Caliberweb == &#039;undefined&#039;) var Caliberweb = {};
(function(){
    if(typeof Caliberweb.Reflection == &#039;undefined&#039;) {
        Caliberweb.Reflection = {
            getMembers: function(obj,match){
                var bucket = [];
                for(var i in obj){
                    if(match(i)) bucket.push(i);
                }
                return bucket;
            },
            GetProperties: function(obj){
                return this.getMembers(obj, function(member){
                    return typeof member != &#039;function&#039;;
                })
            },
            GetMethods: function(obj){
                return this.getMembers(obj, function(member){
                    return typeof member == &#039;function&#039;;
                });
            }
        }
    }
})();
</pre>
]]></content:encoded>
			<wfw:commentRss>http://chris.caliberweb.com/2009/02/22/javascript-reflection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
