change/extend plugin to take json

change/extend plugin to take json

I am using jquery star plugin and want to know how i can extend it so that it can take json and
generate select list for star rating. Now I can go

  1. $( 'rating' ).stars({
  2.    inputType: "select",
  3.    captionEl: $caption,
  4.    callback: function( ui, type, value ){
  5.       $.post( 'demo2.php", { rate: value}, function( data ){
  6.      }
  7.    }
  8. });
but i want to extend this to take json and generate all select list