I am trying to use the JSON.encode method to create JSON for Flex objects. I can encode a Graphic or an Extent properly, but when I try to JSON.encode(Layer) that will not work. What makes objects like Extent/Graphic/Geometry work correctly with JSON.encode, but not Layer?
Thanks