I have animated psd file and trying to export as a JSON file but can export all the animation on psd layer. Is there any way to fix that?
Give us more information..how you are trying to export the JSON file and any error you get while exporting the file. what is the version of After Effects?
You'll need Lottie Files or Bodymovin in order to export a JSON out of AE. There are lots of restrictions in AE, if you want to export a JSON. So, ensure you do lots of reading on the choice of tool you select.
You are tackling the problem from the wrong end. Start by actually educating yourself about
a) which kinds of animations you could export from AE to JSON using Bodymovin'/ Lottie
b) what the general limitations are when exporting these types of animations
c) what stuff can be created natively in AE using masks, shape layers and so on and
d) what specific preparations need to be made to imported assets like your PSD
It's not a good strategy to just create a (potentially complex) graphic and then hoping it could somehow be exported to a fancy animation with a button click. It's simply not smart, especially when using "non-native/ foreign" formats AE was never designed around such as JSON web animation.
I've exported a JSON file using this method: 1. Open the psd file in Photoshop and create a new document with the same dimensions as the psd file. 2. Make sure to select RGB and not CMYK for the color space. 3. Open the animation for the first layer (say Layer 1). Hold the command key and drag the layer from the psd file to the new document. The layer will be placed on the new page. 4. Do the same for each layer. 5. Save the PSD file. 6. Save the file as a png. The animation will appear as a still image in the new file. I hope this helps.